Allow coroutine functions in callbacks
The high-level client on_[SIGNAL]() and low-level add_message_handler() should accept coroutine functions as handlers in addition to normal functions.
Hi, i would expect a signal to be be an awaitable? Why use a callback?
This is just how I do events I guess.
What would awaitable events look like? Do you have an example from another library?
For example if looking at zmq sockets when you subscrie with a with a SUB socket to a PUB socket you await a publication
msg= await sub_socket.recv()
I expected something similar on dbus signals
signal = await bus.signal()
It's easy to implement on the client side using asyncio.Queue. The callback does put_nowait and you can await on the get.