Fix panic when notification dispatch triggers notification dispatch. #18

Merged
trurl merged 1 commits from trurl/wmaker:refactor/riir.reentrant_notification_fix into refactor/riir 2026-03-02 12:16:04 -05:00

1 Commits

Author SHA1 Message Date
eaabf7e20c Fix panic when notification dispatch triggers notification dispatch.
The global `NotificationCenter` is 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.
2026-03-02 12:12:25 -05:00