Exemple #1
0
        public Boundary(Context context, int maxWorkPerLoop)
        {
            asyncWatcher = context.CreateAsyncWatcher(ProcessWork);
            asyncWatcher.Start();

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

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

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

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