Sharpen.Thread.IsAlive C# (CSharp) Method

IsAlive() public method

public IsAlive ( ) : bool
return bool
        public bool IsAlive()
        {
            return thread.IsAlive;
        }

Usage Example

 private void CancelJobCommit()
 {
     lock (this)
     {
         Sharpen.Thread threadCommitting = jobCommitThread;
         if (threadCommitting != null && threadCommitting.IsAlive())
         {
             Log.Info("Cancelling commit");
             threadCommitting.Interrupt();
             // wait up to configured timeout for commit thread to finish
             long now = context.GetClock().GetTime();
             long timeoutTimestamp = now + commitThreadCancelTimeoutMs;
             try
             {
                 while (jobCommitThread == threadCommitting && now > timeoutTimestamp)
                 {
                     Sharpen.Runtime.Wait(this, now - timeoutTimestamp);
                     now = context.GetClock().GetTime();
                 }
             }
             catch (Exception)
             {
             }
         }
     }
 }
All Usage Examples Of Sharpen.Thread::IsAlive