Hi all!
I'm new to these discussion boards and my C/C++ experience is not very deep.
So please be patient with my and forgive me if I don't grasp the structures
here at first glance.
I'm trying to implement some multithreading to my current project and I want
to see how mutexes and events work (the documentation seems to me unclear
here).
So I created an event, called _beginthread followed by by
WaitForSingleObject call. Inside of the thread I ResetEvent (as I said - I'm
testing the possibilities - maybe SetEvent here?).
When debugging, the _beginthread returns thread ID but when I step over the
WaitForSingleObject call, I get the error mentioned above.
I can imagine that the debugger actually doesn't allow the thread to start
untill the debugged thread is put to idle, so the order of events doesn't
have a big significance. Still, I'm pretty clueless and searching MSDN as
well as other developer resources didn't bring any result :(
Greno Zee - 22 Nov 2004 10:39 GMT