CSharpUtils.Threading.GreenThread.ThisSemaphoreWaitOrParentThreadStopped C# (CSharp) Метод

ThisSemaphoreWaitOrParentThreadStopped() публичный Метод

public ThisSemaphoreWaitOrParentThreadStopped ( ) : void
Результат void
		void ThisSemaphoreWaitOrParentThreadStopped()
		{
			while (true)
			{
				// If the parent thread have been stopped. We should not wait any longer.
				if (Kill || !ParentThread.IsAlive)
				{
					break;
				}

				if (ThisEvent.WaitOne(20))
				{
					// Signaled.
					break;
				}
			}

			if (Kill || !ParentThread.IsAlive)
			{
				//throw(new StopException());
				Thread.CurrentThread.Abort();
				//throw (new StopException());
			}
		}