• Allison Karlitskaya's avatar
    GContextSpecificGroup: fix deadlock · 8c104a01
    Allison Karlitskaya authored
    There was a theoretical deadlock between the worker trying to emit a
    signal at the same time as we were waiting for it to shutdown the
    notification (while holding the lock).
    
    The deadlock was particularly annoying because we didn't really need to
    wait for the shutdown and because it wasn't possible to signals to
    arrive while waiting for a start.  Attempting to deal with start and
    stop in an asymmetric way could have lead to other weird situations,
    however.
    
    Drop the lock while waiting for the worker thread to start.  This means
    that we face the possibility of multiple waiters on the cond at the same
    time, so we need to make more of a state machine.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742599
    8c104a01
gcontextspecificgroup.h 1.73 KB