all groups > visual c libraries > november 2004 >
You're in the

visual c libraries

group:

Getting R6016 when trying to start new thread


Getting R6016 when trying to start new thread Greno Zee
11/19/2004 4:37:01 AM
visual c libraries:
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
RE: Getting R6016 when trying to start new thread Greno Zee
11/22/2004 2:39:06 AM
AddThis Social Bookmark Button