Mar 16, 2005 #1 Bartec Programmer Joined Jan 21, 2005 Messages 54 Location PL Hi! Does anybody know how I can make a PAUSE in my thread?? I know howw to stop start but is it possible to pause?? thanks for response Bartek
Hi! Does anybody know how I can make a PAUSE in my thread?? I know howw to stop start but is it possible to pause?? thanks for response Bartek
Mar 16, 2005 #2 drewdaman Programmer Joined Aug 5, 2003 Messages 302 Location CA don't know of straightforward way... since i'm new to multithreading... but if you're using unix, maybe you could use select with a timeout value and a garbage file descriptor... i'm not sure.. but if you call sleep within the thread maybe that will work too... Upvote 0 Downvote
don't know of straightforward way... since i'm new to multithreading... but if you're using unix, maybe you could use select with a timeout value and a garbage file descriptor... i'm not sure.. but if you call sleep within the thread maybe that will work too...
Mar 16, 2005 #3 PerFnurt Programmer Joined Feb 25, 2003 Messages 972 Location SE What do you mean by pause? To just have it wait a while simply use the Sleep function. To explicitly stop/resume it use CWinThread::SuspendThread/ResumeThread /Per www.perfnurt.se Upvote 0 Downvote
What do you mean by pause? To just have it wait a while simply use the Sleep function. To explicitly stop/resume it use CWinThread::SuspendThread/ResumeThread /Per www.perfnurt.se
Mar 17, 2005 #4 drewdaman Programmer Joined Aug 5, 2003 Messages 302 Location CA another option would be to use WaitForSingleObject with a waitable timer. http://msdn.microsoft.com/library/d...ry/en-us/dllproc/base/waitforsingleobject.asp Upvote 0 Downvote
another option would be to use WaitForSingleObject with a waitable timer. http://msdn.microsoft.com/library/d...ry/en-us/dllproc/base/waitforsingleobject.asp