public void Queue(IComputation computation) { if (computation.ComputationType == Resources.Computation_Fiber) FiberPool.QueueWorkItem(computation); else { if (computation.ExecutionType == ComputationExecutionType.LongRunning) { SmartThread thread = new SmartThread(false, -1); thread.Execute(computation); thread.Start(); } SmartThreadPool.QueueWorkItem(computation); } }
public void Queue(IComputation computation) { if (computation.ComputationType == Resources.Computation_Fiber) { FiberPool.QueueWorkItem(computation); } else { if (computation.ExecutionType == ComputationExecutionType.LongRunning) { SmartThread thread = new SmartThread(false, -1); thread.Execute(computation); thread.Start(); } SmartThreadPool.QueueWorkItem(computation); } }
public void Create(SmartThread[] threads) { threadScheduler = new Heap<SmartThread>(threads); IsCreated = true; }