You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (Jira)" <ji...@apache.org> on 2022/02/21 08:38:00 UTC

[jira] [Created] (SUREFIRE-2019) ThreadedStreamConsumer - use Thread.join() instead of CountDownLatch.await()

Tibor Digana created SUREFIRE-2019:
--------------------------------------

             Summary: ThreadedStreamConsumer - use Thread.join() instead of CountDownLatch.await()
                 Key: SUREFIRE-2019
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2019
             Project: Maven Surefire
          Issue Type: Improvement
          Components: Maven Failsafe Plugin, Maven Surefire Plugin, process forking
            Reporter: Tibor Digana
            Assignee: Tibor Digana
             Fix For: 3.0.0-M6


Currently, {{ThreadedStreamConsumer}} uses {{CountDownLatch.await()}} which is not 100% reliable. The thread may die if it is in the waiting state during shutdown period. Let's use {{Thread.join()}} in the {{close()}}.
Attention: do NOT use {{Thread.join()}} in the method {{handleEvent()}} - too slow, and therefore we use {{AtomicBoolean}} as a treatment.



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