How to revoke the sleeping threads.... ???
Ex.
Threading.Thread.Sleep(10000); // it sleep for some time,before the time ends i need to wake up the thread. How ???
Thanks in Advance
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
How to revoke the sleeping threads.... ???
Ex.
Threading.Thread.Sleep(10000); // it sleep for some time,before the time ends i need to wake up the thread. How ???
Thanks in Advance
This is what wait handle events are for. Create an instance of the AutoResetEvent class (or ManualResetEvent, depending on your needs).
Instead of calling Thread.Sleep, call WaitOne on the AutoResetEvent instance. It will wait for the specified time until the event is signalled.
If you need to wake up the thread from another thread, call Set on the AutoResetEvent instance.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.