threads icon indicating copy to clipboard operation
threads copied to clipboard

return status of std::condition_variable wait_for is not always as expected

Open delleceste opened this issue 5 years ago • 1 comments

My application making use of a thread + timer to perform periodical operations in the background stopped working as expected when ported from native C++ (gnu c++) to web assembly.

Simply printing the status returned by

status = m_wait.wait_for(lock, ms);

i realised that from time to time it was 0 (no_timeout) when I expected a timeout.

Is that a possible bug?

Thanks

delleceste avatar Apr 06 '20 13:04 delleceste

If this is a bug, it is with the toolchain you are using, not the spec proposal. If you are using Emscripten, it would be good to file an issue over at https://github.com/emscripten-core/emscripten with reproducing code.

tlively avatar Apr 06 '20 18:04 tlively