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