parallel c++ join in .net 1.1 <p>I'm trying to spawn and then join two threads using MS VS 6.0 (2003), MS .NET Framework 1.1.</p> <p>The following seems to be a reasonable solution:</p> <pre><code>CWinThread* thread1 = AfxBeginThread(worker, &amp;parallel_params); CWinThread* thread2 = AfxBeginThread(worker, &amp;parallel_params); WaitForSingleObject(thread1-&gt;m_hThread, INFINITE); WaitForSingleObject(thread2-&gt;m_hThread, INFINITE); </code></pre> <p>but my main concern has to do with this statement in the documentation: "If this handle is closed while the wait is still pending, the function's behavior is undefined." When do handles get closed? Does ending the worker proc close the handle? If so, am I in trouble? Is this really a reasonable solution??</p>