Csharp/C Sharp by API/System.Threading/AutoResetEvent — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 18:31, 26 мая 2010
AutoResetEvent.WaitOne
<source lang="csharp"> using System; using System.Threading; // AutoReset class Auto {
[STAThread] static void Main() { AutoResetEvent aRE = new AutoResetEvent(true); bool state = aRE.WaitOne(1000, true); Console.WriteLine("After First WaitOne " + state); state = aRE.WaitOne(5000, true); Console.WriteLine("After Second WaitOne " + state); }
}
</source>