QuickFix.ClientHandlerThread.Join C# (CSharp) Method

Join() public method

public Join ( ) : void
return void
        public void Join()
        {
            if(null == thread_)
                return;
            if(thread_.IsAlive)
                thread_.Join(5000);
            thread_ = null;
        }

Usage Example

コード例 #1
0
 private void ShutdownClientHandlerThreads()
 {
     lock (sync_)
     {
         if (State.SHUTDOWN_COMPLETE != state_)
         {
             this.Log("shutting down...");
             while (clientThreads_.Count > 0)
             {
                 ClientHandlerThread t = clientThreads_.First.Value;
                 clientThreads_.RemoveFirst();
                 t.Shutdown("reactor is shutting down");
                 try
                 {
                     t.Join();
                 }
                 catch (System.Exception e)
                 {
                     t.Log("Error shutting down: " + e.Message);
                 }
             }
             state_ = State.SHUTDOWN_COMPLETE;
         }
     }
 }