private void Run () { int times = 1; while (true) { if (deleg != null) deleg.Invoke (); lock (this.forState) this.internalState = ThreadState.Stopped; this.wakeUp.Set (); restart.WaitOne (); times++; } } private ThreadStart deleg;