The only way I know to do this would be to launch the AE as a UIMA-AS
service (as a separate process), call process via the UIMA-AS client
API with a timeout specified, and if a timeout fires then kill the
service.

I don't know of any way to kill a CPU bound java thread and still
leave the rest of the java process running.

Eddie

On Thu, Nov 10, 2011 at 8:06 AM, Rene Boucheron
<[email protected]> wrote:
> Hello,
>
> Is there a timeout function to monitor AE-processing progress included in
> UIMA somewhere?
>
> I build some AnalysisEngines like this
> UIMAFramework.produceAnalysisEngine()... Then I call
> AnalysisEngine.process(cas).
>
> Now, I would like this call to not take longer than some amount of time. If
> it passes a threshold, just kill it.
>
> The only idea I have is to dispatch the process() in a separate Thread and
> periodically check if AnalysisEngineManagement.getNumberOfCASesProcessed
> has increased. Not sure if threading just like this introduces some issues?
>
> Opinions on this problem are very much appreciated.
>
> Kind regards,
> Rene
>

Reply via email to