title: NetServerEnum block when thread is terminated externaly
body: <p>(Working in Win32 api , in C environment with VS2010) </p>
  
  <p>I have a two thread app. The first thread forks the second and waits for a given interval  - 'TIMEOUT', and then calls <code>TerminateThread()</code> on it.
  Meanwhile, second thread calls <code>NetServerEnum()</code>.</p>
  
  <p>It appears that when timeout is reached , whether <code>NetServerEnum</code> returned successfully or not, the first thread get deadlocked. 
  I've already noticed that <code>NetServerEnum</code> creates worker threads of it's own. </p>
  
  <p>I ultimately end up with one of those threads in deadlock, typically on <code>ntdll.dll!RtlInitializeExceptionChain</code>, unable to exit my process gracefully.</p>