Sharpen.Thread.CurrentThread C# (CSharp) Method

CurrentThread() public static method

public static CurrentThread ( ) : Sharpen.Thread
return Sharpen.Thread
        public static Sharpen.Thread CurrentThread()
        {
            if (wrapperThread == null) {
                wrapperThread = new Sharpen.Thread (System.Threading.Thread.CurrentThread);
            }
            return wrapperThread;
        }

Usage Example

 public void Run()
 {
     lock (this) {
         thread = Thread.CurrentThread();
     }
     try {
         if (!canceled)
         {
             Action.Run();
         }
     } finally {
         lock (this) {
             thread = null;
             doneEvent.Set();
             completed = true;
         }
     }
 }