コード例 #1
0
 internal static void Idle(MqTaskThread Thread)
 {
     lock (threads)
     {
         threads.AddLast(Thread);
     }
 }
コード例 #2
0
        internal static void ExecuteTask(MqTask Item)
        {
            if (terminated)
            {
                return;
            }

            MqTaskThread T;

            lock (threads)
            {
                if (threads.First is null)
                {
                    T = null;
                }
                else
                {
                    T = threads.First.Value;
                    threads.RemoveFirst();
                }
            }

            if (T is null)
            {
                T = new MqTaskThread(terminating);
            }

            T.Execute(Item);
        }