DeferredMonitor: fix race condition when using GLib event loop

Turns out the lock-free code using atomics was not thread-safe.  The
given callback could be invoked by GLib before the source_id attribute
was assigned.  This commit changes the DeferredMonitor class to use a
Mutex to block the event loop until source_id is assigned.  This bug
does not exist in the 0.19 branch because it does not use the GLib
main loop anymore.
This commit is contained in:
Max Kellermann
2014-04-26 22:11:23 +02:00
parent 54ebf2a699
commit 0efb67b51e
3 changed files with 23 additions and 11 deletions

1
NEWS
View File

@@ -1,4 +1,5 @@
ver 0.18.11 (not yet released)
* fix race condition when using GLib event loop (non-Linux)
ver 0.18.10 (2014/04/10)
* decoder