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:45:00 UTC

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

     [ https://issues.apache.org/jira/browse/SUREFIRE-2019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tibor Digana closed SUREFIRE-2019.
----------------------------------
    Resolution: Fixed

https://gitbox.apache.org/repos/asf?p=maven-surefire.git;a=commit;h=892b9db9d7ed8f472bd6d88f24b70441744e828e

> 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
>            Priority: Major
>             Fix For: 2.22.3, 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)