@@ -828,18 +828,6 @@ class Thread
828
828
// having thread being treated like a daemon thread.
829
829
synchronized ( slock )
830
830
{
831
- // NOTE: when creating threads from inside a DLL, DllMain(THREAD_ATTACH)
832
- // might be called before ResumeThread returns, but the dll
833
- // helper functions need to know whether the thread is created
834
- // from the runtime itself or from another DLL or the application
835
- // to just attach to it
836
- // as a consequence, the new Thread object is added before actual
837
- // creation of the thread. There should be no problem with the GC
838
- // calling thread_suspendAll, because of the slock synchronization
839
- //
840
- // VERIFY: does this actually also apply to other platforms?
841
- add( this );
842
-
843
831
version ( Windows )
844
832
{
845
833
if ( ResumeThread( m_hndl ) == - 1 )
@@ -862,6 +850,18 @@ class Thread
862
850
if ( m_tmach == m_tmach.init )
863
851
throw new ThreadException ( " Error creating thread" );
864
852
}
853
+
854
+ // NOTE: when creating threads from inside a DLL, DllMain(THREAD_ATTACH)
855
+ // might be called before ResumeThread returns, but the dll
856
+ // helper functions need to know whether the thread is created
857
+ // from the runtime itself or from another DLL or the application
858
+ // to just attach to it
859
+ // as a consequence, the new Thread object is added before actual
860
+ // creation of the thread. There should be no problem with the GC
861
+ // calling thread_suspendAll, because of the slock synchronization
862
+ //
863
+ // VERIFY: does this actually also apply to other platforms?
864
+ add( this );
865
865
}
866
866
}
867
867
0 commit comments