[ 
https://issues.apache.org/jira/browse/UIMA-6399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17478744#comment-17478744
 ] 

Richard Eckart de Castilho commented on UIMA-6399:
--------------------------------------------------

Superseded by UIMA-6412 (stop using ThreadGroup in CPE).

> RutaPatternCache prevents CPEEngine from terminating
> ----------------------------------------------------
>
>                 Key: UIMA-6399
>                 URL: https://issues.apache.org/jira/browse/UIMA-6399
>             Project: UIMA
>          Issue Type: Bug
>          Components: Ruta
>            Reporter: Richard Eckart de Castilho
>            Assignee: Richard Eckart de Castilho
>            Priority: Major
>             Fix For: 2.9.0ruta, 3.1.1ruta
>
>         Attachments: Screenshot 2021-12-10 at 17.38.08.png
>
>
> The {{RutaPatternCache}} creates a Caffeine cache internally which spawns a 
> cleanup worker thread. If this thread is spawed while Ruta is running in a 
> CPE, then the thread is added to the CPE's thread group. When the CPE is done 
> processing, it waits for all the worker threads in its group to terminate. 
> Normally, these are only the reader thread, the processor threads, the 
> consumer thread, and the thread-group destroyer thread. The extra thread 
> added via Caffeine causes the thread-group destroyer to believe that there 
> are still workers running and thus it will never terminate the CPEEngine. 
> That means, the engines and resources used in the engine will never be GCed.
>  !Screenshot 2021-12-10 at 17.38.08.png|width=50%! 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to