Create a Dispatcher, .notify() it about new messages, and use the returned waiter in message handlers.
Dispatcher
.notify()