uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslaw Cwiklik <uim...@gmail.com>
Subject Re: Daemon threads prevents CPE exit
Date Thu, 21 Oct 2010 17:49:03 GMT
Timo, I think this is a bug. The ThreadGroup should exclude daemon threads
in its accounting while trying to determine which threads are running.
Please open bug report for this.

Thanks, Jerry C


On Thu, Oct 21, 2010 at 4:29 AM, Timo Boehme <timo.boehme@ontochem.com>wrote:

> Hi,
>
> before I might create a bug report I would like to ask the list if the
> behavior of the CPM engine in respect to daemon threads is intended or not.
>
> The problem:
> Within an AE I have created daemon threads for processing some tasks. The
> threads are within a singleton class with a static variable containing the
> single instance. The threads are explicitly marked as daemon threads in
> order to not wait for them after processing ends.
> After processing of all documents finished, the CPE calls
> CollectionProcessComplete but the application does not exit.
> The reason: in org.apache.uima.collection.impl.cpm.engine.CPMEngine a
> threadGroupDestroyer thread is created (line 2522) which waits for threads
> to die. Since it does not check for daemon threads it counts them as normal
> threads to wait for and thus it waits forever.
>
> My workaround was to specify another ThreadGroup outside CPMThreadGroup.
> However this is only possible as long as I have the source code for the
> libraries in use.
>
> In general I would think that UIMA should really test for daemon threads
> (even more as the used group.activeCount() should only be used for
> information purposes - as the javadoc states).
>
> Any comments?
>
> Thanks,
> Timo
>
> --
>
>  Timo Boehme
>  OntoChem GmbH
>  H.-Damerow-Str. 4
>  06120 Halle/Saale
>  T: +49 345 4780472
>  F: +49 345 4780471
>  timo.boehme@ontochem.com
>
> _____________________________________________________________________
>
>  OntoChem GmbH
>  Geschäftsführer: Dr. Lutz Weber
>  Sitz: Halle / Saale
>  Registergericht: Stendal
>  Registernummer: HRB 215461
> _____________________________________________________________________
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message