Exemplo n.º 1
0
        public Boundary(Context context, int maxWorkPerLoop)
        {
            asyncWatcher = context.CreateAsyncWatcher(ProcessWork);
            asyncWatcher.Start();

            workQueue           = new ConcurrentQueue <Action> ();
            this.maxWorkPerLoop = maxWorkPerLoop;
        }
Exemplo n.º 2
0
        public Boundary(Context context, int maxWorkPerLoop)
        {
            asyncWatcher = context.CreateAsyncWatcher(ProcessWork);
            asyncWatcher.Start();

            workQueue = new ConcurrentQueue<Action>();
            this.maxWorkPerLoop = maxWorkPerLoop;
        }
Exemplo n.º 3
0
        public Boundary(IOLoop loop, int maxWorkPerLoop)
        {
            asyncWatcher = loop.NewAsyncWatcher(ProcessWork);
            asyncWatcher.Start();

            workQueue           = new ConcurrentQueue <Action> ();
            this.maxWorkPerLoop = maxWorkPerLoop;
        }
Exemplo n.º 4
0
 public void Complete(Action callback)
 {
     completeWatcher = IOLoop.Instance.NewAsyncWatcher(delegate {
         completeWatcher.Dispose();
         completeWatcher = null;
         callback();
     });
     completeWatcher.Start();
     Stream.End(completeWatcher.Send);
 }
Exemplo n.º 5
0
        public void Complete(Action callback)
        {
            IAsyncWatcher completeWatcher = null;

            completeWatcher = Context.CreateAsyncWatcher(delegate {
                completeWatcher.Dispose();
                callback();
            });
            completeWatcher.Start();
            Stream.End(completeWatcher.Send);
        }
Exemplo n.º 6
0
 public void Start()
 {
     asyncWatcher.Start();
 }
Exemplo n.º 7
0
 public HttpEntity()
 {
     end_watcher = IOLoop.Instance.NewAsyncWatcher(HandleEnd);
     end_watcher.Start();
 }
Exemplo n.º 8
0
 public HttpEntity(Context context)
 {
     this.Context = context;
     end_watcher  = context.CreateAsyncWatcher(HandleEnd);
     end_watcher.Start();
 }