pybuses
pybuses copied to clipboard
implement command bus to return values from handlers
return awaitable result for example
That's pretty big stuff to make this library compatible with async.
For the command bus itself, I'd rather see it like adding handle_async
method that will be an async
function, but still won't return anything. You could wait for the completion, though.
I was eager to give such an implementation a try, but then I realized it goes further - what about middlewares and event bus? I'm not saying no, but is it worth it?
It would be great to implement asynchronous event handling. Look at my implementation of the asynchronous command bus. I use pipline with behavior handlers. In the future I want to add events feature