Mar 16, 2005 #1 Bartec Programmer Jan 21, 2005 54 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 Aug 5, 2003 302 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 Feb 25, 2003 972 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 [sub] www.perfnurt.se[/sub] 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 [sub] www.perfnurt.se[/sub]
Mar 17, 2005 #4 drewdaman Programmer Aug 5, 2003 302 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