13
0

[Summary] Fixed race condition: "should_do_transport_work" must not be dropped to 0 outside, it's illegal. It may cause "should_do_transport_work" go below 0 and make butler to round for a very-very long time (hang and possible lock of other threads) before stop() call returns.

_butler->stop () is synchronous, so its safe to wait in this call for butler to finish it's work.

[Reviewed by] PDavis
This commit is contained in:
GZharun 2015-02-25 03:02:28 +02:00 committed by Paul Davis
parent 7ef5aea500
commit 87f1c66ba1

View File

@ -1789,8 +1789,6 @@ Session::engine_halted ()
*/
if (_butler) {
g_atomic_int_set (&_butler->should_do_transport_work, 0);
set_post_transport_work (PostTransportWork (0));
_butler->stop ();
}