Blocking of thread
-
Is it good programming, blocking of thread with event->Lock() instead of using ::WaitForSingleObject() function. NSS NSS
-
Is it good programming, blocking of thread with event->Lock() instead of using ::WaitForSingleObject() function. NSS NSS
sthalasayanam wrote: event->Lock() Is a MFC way to force Thread in Waiting state and.. sthalasayanam wrote: ::WaitForSingleObject() function. It Is win32 way to Force Wait for thread.... About good Programming practice.. it depends on company to company... as both are equally good.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
Is it good programming, blocking of thread with event->Lock() instead of using ::WaitForSingleObject() function. NSS NSS
Well, the ::WaitForSingleObject API function is more versatile, in the sense that it accepts a variety of handles and works for all of them. That said, if all you want is event based waiting, you might as well use CEvent and Lock. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
Well, the ::WaitForSingleObject API function is more versatile, in the sense that it accepts a variety of handles and works for all of them. That said, if all you want is event based waiting, you might as well use CEvent and Lock. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
Thnaks for your answer. NSS