* win32_threads.c: If SuspendThread fails, don't abort. Instead
remove thread from GC, as this only seems to happen when thread is
terminating.
svn path=/trunk/mono/; revision=77073
+2007-05-09 Jonathan Chambers <joncham@gmail.com>
+
+ * win32_threads.c: If SuspendThread fails, don't abort. Instead
+ remove thread from GC, as this only seems to happen when thread is
+ terminating.
+
2007-03-29 Zoltan Varga <vargaz@gmail.com>
* autogen.sh: Applied patch from Priit Laes <amd@store20.com>. Fix the running
# endif
continue;
}
- if (SuspendThread(thread_table[i].handle) == (DWORD)-1)
- ABORT("SuspendThread failed");
+ if (SuspendThread(thread_table[i].handle) == (DWORD)-1) {
+ thread_table[i].stack_base = 0; /* prevent stack from being pushed */
+# ifndef CYGWIN32
+ /* this breaks pthread_join on Cygwin, which is guaranteed to */
+ /* only see user pthreads */
+ thread_table[i].in_use = FALSE;
+ CloseHandle(thread_table[i].handle);
+# endif
+ }
# endif
thread_table[i].suspended = TRUE;
}