[runtime] When attaching a tools thread, spin-wait for thread system init. Fixes...
authorAlexis Christoforides <alexis@thenull.net>
Tue, 12 May 2015 19:30:18 +0000 (15:30 -0400)
committerAlexis Christoforides <alexis@thenull.net>
Tue, 12 May 2015 19:30:18 +0000 (15:30 -0400)
mono/utils/mono-threads.c

index 1f6f48cc2840c67b845333e713b8af45678cf85e..a372d2a3731d09686ad0c6ea8bcd5e15c7315293 100644 (file)
@@ -492,6 +492,8 @@ mono_threads_attach_tools_thread (void)
 
        /* Must only be called once */
        g_assert (!mono_native_tls_get_value (thread_info_key));
+       
+       while (mono_threads_inited) { }
 
        info = mono_thread_info_attach (&dummy);
        g_assert (info);