public static IFiber StartNew(string name) { var fiber = new ThreadFiber(name); fiber.Start(); return(fiber); }
public static IFiber StartNew() { ThreadFiber pool = new ThreadFiber(); pool.Start(); return(pool); }
public static IFiber StartNew(IExecutor executor) { ThreadFiber pool = new ThreadFiber(executor); pool.Start(); return(pool); }
public IFiber Build() { if (_executor == null) _executor = new Executor(); IFiber fiber; switch (_type) { case FiberType.Thread: fiber = new ThreadFiber(_executor, new TimerScheduler(), _queue, _name, true, _priority); break; case FiberType.Pool: fiber = new PoolFiber(_executor); break; case FiberType.Stub: fiber = new StubFiber(_executor); break; default: throw new ArgumentOutOfRangeException(); } return fiber; }
public static IFiber StartNew(string name) { var fiber = new ThreadFiber(name); fiber.Start(); return fiber; }