summaryrefslogtreecommitdiffhomepage
path: root/compat/run-in-thread.hpp
AgeCommit message (Collapse)Author
2018-01-16add missing copyright statementStanislaw Halik
2016-12-30compat: prevent deadlock with raceStanislaw Halik
We can't depend on cvar getting notified only after "src" runs out of scope. Now, in case signal destroyed() runs first: - mtx locked - flag set to true - empty cvar notified Thus, doesn't hang. In case we wait first: - mtx locked - flag is false - cvar notification arrives Of course semaphore code always runs serially since they're covered by a mutex. We have all our bases covered. Previously the code never hung simply because the "curthread" condition was always true. I removed the "curthread" code paths since they don't add anything. Also rvalue references got used incorrectly.
2016-12-03compat: add assertsStanislaw Halik
2016-11-29compat/run-in-thread: fix on msvc 2017Stanislaw Halik
2016-10-26compat/util: split out run-in-thread{,-async}Stanislaw Halik