* threads.c (signal_thread_state_change): Handle the case when the
target thread is the current thread.
svn path=/trunk/mono/; revision=39018
2005-01-17 Zoltan Varga <vargaz@freemail.hu>
+ * threads.c (signal_thread_state_change): Handle the case when the
+ target thread is the current thread.
+
* marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
* marshal.c: Rename emit_ptr_to_str_conv and its pair to
*/
static void signal_thread_state_change (MonoThread *thread)
{
+ if (thread == mono_thread_current ()) {
+ /* Do it synchronously */
+ MonoException *exc = mono_thread_request_interruption (FALSE);
+ if (exc)
+ mono_raise_exception (exc);
+ }
+
#ifdef __MINGW32__
QueueUserAPC (interruption_request_apc, thread->handle, NULL);
#else