Commit fedf8759 authored by Edric Milaret's avatar Edric Milaret

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
......@@ -117,7 +117,11 @@ void ThreadLoop::exit()
ThreadLoop::isRunning() const noexcept
#ifdef _WIN32
return state_ == RUNNING;
return thread_.joinable() and state_ == RUNNING;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment