예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 public void Create(SmartThread[] threads)
 {
     threadScheduler = new Heap<SmartThread>(threads);
     IsCreated = true;
 }