/// <summary>
        /// Implements the entry point for the thread.
        /// </summary>
        /// <param name="context">Additional contextual information.</param>
        private void threadEntry(NSFContext context)
        {
            try
            {
                threadLoop();
            }
            catch (Exception exception)
            {
                handleException(new Exception(Name + " thread loop exception", exception));
            }

            lock (threadMutex)
            {
                TerminationStatus = NSFThreadTerminationStatus.ThreadTerminated;
                NSFEnvironment.removeThread(this);
            }
        }
        /// <summary>
        /// Implements the entry point for the thread.
        /// </summary>
        /// <param name="context">Additional contextual information.</param>
        private void threadEntry(NSFContext context)
        {
            try
            {
                threadLoop();
            }
            catch (Exception exception)
            {
                handleException(new Exception(Name + " thread loop exception", exception));
            }

            lock (threadMutex)
            {
                TerminationStatus = NSFThreadTerminationStatus.ThreadTerminated;
                NSFEnvironment.removeThread(this);
            }
        }
 private void thread1Loop(NSFContext context)
 {
     while (contextSwitchCount < TotalContextSwitches)
     {
         signal1.send();
         signal2.wait(1000);
         contextSwitchCount += 2;
     }
 }
 private void resetComm(NSFContext context)
 {
     commReady = true;
     queueEvent(commReadyEvent);
 }
 private void resetHardware(NSFContext context)
 {
     hardwareReset = true;
     queueEvent(hardwareResetEvent);
 }
 /// <summary>
 /// Sends the signal.
 /// </summary>
 /// <param name="context">The context in which the method is called.</param>
 public void send(NSFContext context)
 {
     send();
 }
 /// <summary>
 /// Sends the signal.
 /// </summary>
 /// <param name="context">The context in which the method is called.</param>
 public void send(NSFContext context)
 {
     send();
 }