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