void Run(object ell) { while (true) { if (ChangeLight.precessing) { changeLight.ChangeIt((Ellipse)ell, main); } else { break; } } }
void Run() { while (true) { if (ChangeLight.precessing) { //lock (chgLight) //{ //Thread.Sleep(1000); //Console.WriteLine("YR"); light.ChangeIt(main); //Thread.Sleep(1000); //} } else //{Thread.Sleep(0); { break; //} } } }