Fix panic when notification dispatch triggers notification dispatch. #18
Reference in New Issue
Block a user
Delete Branch "trurl/wmaker:refactor/riir.reentrant_notification_fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The global
NotificationCenteris kept behind a mutex, which was locked when notifications were dispatched.As a result, if notification dispatch triggered dispatch of other notifications, we would fail to unlock the mutex and panic.
This change copies dispatch instructions out from inside the mutex, releases the mutex, and then actually does the dispatch.
0d4272da9atocf9ea2de4dThis fixes an obvious crash, so I'm going to merge soon. Needs tests before I do that.
cf9ea2de4dtoeaabf7e20c