Beispiel #1
0
 public AsyncRequestAgent(Func <IRequest <TRequest, TReply>, Task> handler, Action <Exception> callback)
 {
     Fiber    = new AsyncFiber(callback);
     _channel = Fiber.NewRequestPort(handler);
 }
Beispiel #2
0
 public AsyncRequestAgent(IFiberFactory factory, Func <IRequest <TRequest, TReply>, Task> handler,
                          Action <Exception> callback)
 {
     Fiber    = factory.CreateAsyncFiber(callback);
     _channel = Fiber.NewRequestPort(handler);
 }
Beispiel #3
0
 protected AsyncUntypedActor(IFiberFactory factory = null)
 {
     Fiber        = factory?.CreateAsyncFiber(OnError) ?? new AsyncFiber(OnError);
     _tellChannel = Fiber.NewChannel <object>(ReceiveAsync);
     _askChannel  = Fiber.NewRequestPort <object, object>(OnRequestAsync);
 }