Exemplo n.º 1
0
 /// <summary>
 /// Construct new instance.
 /// </summary>
 public PoolFiber()
 {
     _queue     = new DefaultQueue();
     _scheduler = new Scheduler(this);
     _thread    = new DefaultThreadPool();
     _executor  = new DefaultExecutor();
 }
Exemplo n.º 2
0
 /// <inheritdoc />
 /// <summary>
 /// Creates a thread fiber with a specified queue.
 /// </summary>
 /// <param name="queue"></param>
 public ThreadFiber(IQueue queue)
 {
     _queue     = queue;
     _executor  = new DefaultExecutor();
     _scheduler = new Scheduler(this);
     _thread    = new DefaultThread();
     _thread.Queue(RunOnThread);
 }