Skip to content
Snippets Groups Projects
Commit fedf8759 authored by Edric Milaret's avatar Edric Milaret
Browse files

windows: fix race conditions in threadloop

- It seems like we sometimes call joinable() too
soon, it return false and then it interrupt ffmpeg
- It happens regurlarly when we don't launch the Windows
Ring client without console
- This will need further investigation to determine if it's
a more profound issue or if it could theoretically affect
other platforms (even if we never constated it yet)

No bugs have been constated from not checking the joinable in
isRunning after 35 calls

Change-Id: I0968d9cfe401511c37231dc7defb4b3d74a77453
Tuleap: #303
parent 927f3b9c
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,11 @@ void ThreadLoop::exit()
bool
ThreadLoop::isRunning() const noexcept
{
#ifdef _WIN32
return state_ == RUNNING;
#else
return thread_.joinable() and state_ == RUNNING;
#endif
}
bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment