public Boundary(Context context, int maxWorkPerLoop) { asyncWatcher = context.CreateAsyncWatcher(ProcessWork); asyncWatcher.Start(); workQueue = new ConcurrentQueue <Action> (); this.maxWorkPerLoop = maxWorkPerLoop; }
public Boundary(Context context, int maxWorkPerLoop) { asyncWatcher = context.CreateAsyncWatcher(ProcessWork); asyncWatcher.Start(); workQueue = new ConcurrentQueue<Action>(); this.maxWorkPerLoop = maxWorkPerLoop; }
public Boundary(IOLoop loop, int maxWorkPerLoop) { asyncWatcher = loop.NewAsyncWatcher(ProcessWork); asyncWatcher.Start(); workQueue = new ConcurrentQueue <Action> (); this.maxWorkPerLoop = maxWorkPerLoop; }
public void Complete(Action callback) { completeWatcher = IOLoop.Instance.NewAsyncWatcher(delegate { completeWatcher.Dispose(); completeWatcher = null; callback(); }); completeWatcher.Start(); Stream.End(completeWatcher.Send); }
public void Complete(Action callback) { IAsyncWatcher completeWatcher = null; completeWatcher = Context.CreateAsyncWatcher(delegate { completeWatcher.Dispose(); callback(); }); completeWatcher.Start(); Stream.End(completeWatcher.Send); }
public void Start() { asyncWatcher.Start(); }
public HttpEntity() { end_watcher = IOLoop.Instance.NewAsyncWatcher(HandleEnd); end_watcher.Start(); }
public HttpEntity(Context context) { this.Context = context; end_watcher = context.CreateAsyncWatcher(HandleEnd); end_watcher.Start(); }