/// <summary> /// Construct new instance. /// </summary> public PoolFiber() { _queue = new DefaultQueue(); _scheduler = new Scheduler(this); _thread = new DefaultThreadPool(); _executor = new DefaultExecutor(); }
/// <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); }