コード例 #1
0
 /// <summary>
 ///     Queue the event loop given by thread
 /// </summary>
 /// <param name="thread"></param>
 private void StartThread(string thread)
 {
     if (thread == "Change")
     {
         scriptChangeThreadpool.QueueEvent(ScriptChangeQueue, 2);
     }
     else if (thread == "CmdHandlerQueue" && Interlocked.Read(ref CmdHandlerQueueIsRunning) == 0)
     {
         cmdThreadpool.ClearEvents();
         cmdThreadpool.QueueEvent(CmdHandlerQueue, 2);
     }
 }
コード例 #2
0
 public void DisableThreads()
 {
     Interlocked.Exchange(ref CmdHandlerQueueIsRunning, 0);
     EventProcessorIsRunning = false;
     ScriptChangeIsRunning   = false;
     cmdThreadpool.ClearEvents();
     scriptChangeThreadpool.ClearEvents();
     scriptThreadpool.ClearEvents();
 }