Subject: waiting on threads
From: [email-masked] (Gregg Jensen)

1 May 1997 14:38:04 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: [email-masked]
X-Mailer: Windows Eudora Light Version 3.0.1 (32)
Original-To: [email-masked]
Original-Sender: [email-masked]

Ok, I have added the use of threads in my program (instead
of forking, which I could not get to work, but that is
another issue...), and for the most part it works as
advertised.  I lay out 6 threads and then call 
WaitForMultipleObjects passing the variable hThread
(which is defined as hThread[7]).  The handle from each
CreateThread is put into an empty spot in the hThread
array.  When I call WaitForMultipleObjects, I get an
error of INVALID_HANDLE_ERROR (or whatever 6 is).  I then
went through the array one at a time with WaitForSingleObject
and found that the fourth and fifth one were invalid, but
the rest were OK.  This is a little test prototype so there
is not much going on, but I am curious to know if anyone,
who has been using the native threads, has had any problems
(other then the debugging problem from Bruce McLeod), with
these functions?

Gregg Jensen
[email-masked]

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".