/// <summary>
 /// Removes a thread from the environment's list of threads.
 /// </summary>
 internal static void removeThread(NSFThread thread)
 {
     lock (environmentMutex)
     {
         threads.Remove(thread);
     }
 }
 /// <summary>
 /// Adds a thread to the environment's list of threads.
 /// </summary>
 internal static void addThread(NSFThread thread)
 {
     lock (environmentMutex)
     {
         threads.Add(thread);
     }
 }