Return-Path: Delivered-To: apmail-incubator-uima-user-archive@locus.apache.org Received: (qmail 47984 invoked from network); 12 Nov 2007 12:10:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2007 12:10:32 -0000 Received: (qmail 69970 invoked by uid 500); 12 Nov 2007 12:10:19 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 69955 invoked by uid 500); 12 Nov 2007 12:10:19 -0000 Mailing-List: contact uima-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: uima-user@incubator.apache.org Delivered-To: mailing list uima-user@incubator.apache.org Received: (qmail 69946 invoked by uid 99); 12 Nov 2007 12:10:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 04:10:19 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [69.93.87.20] (HELO gateway02.websitewelcome.com) (69.93.87.20) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 12:11:06 +0000 Received: (qmail 15416 invoked from network); 12 Nov 2007 12:10:25 -0000 Received: from gator74.hostgator.com (67.18.27.130) by gateway02.websitewelcome.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 12 Nov 2007 12:10:25 -0000 Received: from ool-44c6c63b.dyn.optonline.net ([68.198.198.59]:8381 helo=[192.168.1.100]) by gator74.hostgator.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IrY73-0006Op-BH for uima-user@incubator.apache.org; Mon, 12 Nov 2007 06:09:57 -0600 Message-ID: <4738425F.5040600@schor.com> Date: Mon, 12 Nov 2007 07:09:03 -0500 From: Marshall Schor User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: uima-user@incubator.apache.org Subject: Re: Multithreading question References: <4738111D.2030102@michael-baessler.de> In-Reply-To: <4738111D.2030102@michael-baessler.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator74.hostgator.com X-AntiAbuse: Original Domain - incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com X-Virus-Checked: Checked by ClamAV on apache.org This may not be quite precise enough. Your Annotators will be instantiated multiple times, so that a single *instance* of an annotator will not be run on multiple threads at once. So - if you have non-static fields in your annotator, they do not need to be accessed with threading in mind. But if you make use of "static" fields, there is only one instance of these, so access to them must be thread-safe. If your *application* (not your annotator) is multi-threaded, it will need to be thread-safe. You can find relevant information about this in the tutorial and reference docs for UIMA (search for "thread"). -Marshall Michael Baessler wrote: > Benjamin Sznajder wrote: >> Hi all, >> >> I am interested in using multi-threading in UIMA. >> My aim is that the flow runs several annotators in parallel. >> One of my annotators is not thread-safe. My question is, then, >> Does the UIMA parallelism ( setting "MultipleDeployment=true") requires >> that annotators on which this flag is set, are thread-safe? >> >> Regards, >> Benjamin. >> >> > Yes, your annotator have to be thread-safe when you want to run them > multi-threaded. > > -- Michael > >