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.
Showing
Please
register
or
sign in
to comment