• J
    UI: Fix potential deadlocks when saving · 49501be2
    jp9000 提交于
    SaveProject calls obs functions that locks certain mutexes, and because
    I made it so that SaveProject was being called inside of certain signal
    handlers (which could already be locked in other mutexes), it could
    cause a mutual deadlock with other threads.
    
    This fix puts the main project saving code in to SaveProjectDeferred,
    then pushes it on to the Qt message queue to safely save outside of
    those locks.  It's a function that's perfectly safe to put on the
    message queue because it will automatically be disabled in certain
    circumstances where it would be unsafe to call, such as on shutdown.
    
    This code will also make it so that the project will not needlessly be
    saved more than once if the SaveProjectDeferred call was pushed multiple
    times on to the queue.
    49501be2
window-basic-main.cpp 90.5 KB