Add channel
This adds
- A loop source that reacts to any IO that implements
AsRawFd
. - A custom channel that can be attached to a loop, calling a callback with each message received. This uses the IoSource with a raw eventfd that is used to signal when messages are waiting.
I did test the channel manually with a couple of debug statements, and it seemed to work really well. The loop was woken exactly once even if multiple messages are queued shortly after another, and never without a message waiting.
WIP because I need to find time to add documentation for everything, but otherwise this is ready.
Edited by Tom Wagner