/// <summary> /// Creates a thread fiber. /// </summary> /// <param name="queue"></param> /// <param name="threadName"></param> /// <param name="isBackground"></param> /// <param name="priority"></param> public ThreadFiber(IQueue queue, string threadName, bool isBackground = true, ThreadPriority priority = ThreadPriority.Normal) { _queue = queue; _thread = new Thread(RunThread); _thread.Name = threadName; _thread.IsBackground = isBackground; _thread.Priority = priority; _scheduler = new Scheduler(this); }
public BaseFiber() { _scheduler = new Scheduler(this); }
/// <summary> /// Creates an instance. /// </summary> public GuiFiber(IExecutionContext executionContext, IExecutor executor) { _timer = new Scheduler(this); _executionContext = executionContext; _executor = executor; }
/// <summary> /// Construct new instance. /// </summary> /// <param name="pool"></param> /// <param name="executor"></param> public PoolFiber(IThreadPool pool, IExecutor executor) { _timer = new Scheduler(this); _pool = pool; _executor = executor; }
/// <summary> /// Creates a thread fiber. /// </summary> /// <param name="queue"></param> /// <param name="threadName"></param> /// <param name="isBackground"></param> /// <param name="priority"></param> public ThreadFiber(IQueue queue, Func<Action, IThread> threadCreator) { _queue = queue; _thread = threadCreator(RunThread); _scheduler = new Scheduler(this); }