Describe the bug
AsyncNotificationCenter::stop() only calls NotificationQueue::wakeUpAll() and never enqueues anything, so the dequeue thread may miss the wake-up if it happens in the gap before the thread blocks.
Solution
Enqueue internally an explicit ShutdownNotification before calling wakeUpAll().
Describe the bug
AsyncNotificationCenter::stop() only calls NotificationQueue::wakeUpAll() and never enqueues anything, so the dequeue thread may miss the wake-up if it happens in the gap before the thread blocks.
Solution
Enqueue internally an explicit ShutdownNotification before calling wakeUpAll().