pybuses icon indicating copy to clipboard operation
pybuses copied to clipboard

implement command bus to return values from handlers

Open megafetis opened this issue 5 years ago • 3 comments

megafetis avatar Feb 19 '20 14:02 megafetis

return awaitable result for example

megafetis avatar Feb 19 '20 14:02 megafetis

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?

Enforcer avatar Apr 04 '21 18:04 Enforcer

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

megafetis avatar Apr 05 '21 07:04 megafetis