vlingo-net / xoom-net-common

These are just a few common tools shared across various vlingo .NET projects.
Mozilla Public License 2.0
7 stars 9 forks source link

The resulting Task in AsyncMessageQueue should be cancelled #33

Closed tjaskula closed 5 years ago

tjaskula commented 5 years ago

The resulting Task should be awaited when closing the mailbox and any catches exceptions should be logged.

https://github.com/vlingo-net/vlingo-net-common/blob/a551e337108702c54aed97346f14a6bfc207950f/src/Vlingo.Common/Message/AsyncMessageQueue.cs#L43

zpbappi commented 5 years ago

@tjaskula good catch. However, it is in the constructor. We may need to change the implementation a little to make it work. e.g., using a background thread or worker.

tjaskula commented 5 years ago

@zpbappi We can take a reference to the task and keep it in the private field. Then when the queue is disposed we can cancel the task

vany0114 commented 5 years ago

I was taking a look at this guy, but it seems it is already fixed :)

tjaskula commented 5 years ago

Fixed in #34