Click here to Skip to main content
16,022,846 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,
How can i sleep a thread for ever and how to continue the thread which is sleeping for ever?
I need to use in pause and play.

Thankyou
YPKI
Posted

Infinite wait is not the best option in most cases, timeout can be handy.
And for your problem, you could use ManualResetEvent.
Msdn[^]
 
Share this answer
 
You can use Critical Sections or Semaphores.
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900