public QueueConsumer(IFiber target, Action <TMsg> callback, QueueChannel2 <TMsg> eventChannel) { _target = target; _callback = callback; _eventChannel = eventChannel; _cache = ConsumeNext; _eventChannel.Signal += Signal; }
public AsyncQueueConsumer(IAsyncFiber target, Func <TMsg, Task> callback, QueueChannel2 <TMsg> eventChannel) { _target = target; _callback = callback; _eventChannel = eventChannel; _cache = ConsumeNext; eventChannel.Signal += Signal; }