diff --git a/BeefLibs/corlib/src/Runtime.bf b/BeefLibs/corlib/src/Runtime.bf index 778a36cf..96ae54fc 100644 --- a/BeefLibs/corlib/src/Runtime.bf +++ b/BeefLibs/corlib/src/Runtime.bf @@ -1,3 +1,4 @@ +using System.Threading; #if BF_ENABLE_OBJECT_DEBUG_FLAGS || BF_DEBUG_ALLOC #define BF_DBG_RUNTIME #endif @@ -303,6 +304,7 @@ namespace System #if BF_DBG_RUNTIME Dbg_Init(cVersion, (int32)flags, &BfRtCallbacks.sCallbacks); #endif + Thread.[Friend]Init(); } [NoReturn] diff --git a/BeefLibs/corlib/src/Threading/Thread.bf b/BeefLibs/corlib/src/Threading/Thread.bf index a357cb84..c00b2cf8 100644 --- a/BeefLibs/corlib/src/Threading/Thread.bf +++ b/BeefLibs/corlib/src/Threading/Thread.bf @@ -140,7 +140,7 @@ namespace System.Threading SetStart((Delegate)start, maxStackSize); } - static this() + static void Init() { #unwarn RuntimeThreadInit runtimeThreadInitRef = ?;