1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +02:00

Fixed Thread.CurrentThread initialization order issue

This commit is contained in:
Brian Fiete 2021-01-05 16:16:28 -08:00
parent 327a92ba10
commit 080dd5a25e
2 changed files with 3 additions and 1 deletions

View file

@ -1,3 +1,4 @@
using System.Threading;
#if BF_ENABLE_OBJECT_DEBUG_FLAGS || BF_DEBUG_ALLOC #if BF_ENABLE_OBJECT_DEBUG_FLAGS || BF_DEBUG_ALLOC
#define BF_DBG_RUNTIME #define BF_DBG_RUNTIME
#endif #endif
@ -303,6 +304,7 @@ namespace System
#if BF_DBG_RUNTIME #if BF_DBG_RUNTIME
Dbg_Init(cVersion, (int32)flags, &BfRtCallbacks.sCallbacks); Dbg_Init(cVersion, (int32)flags, &BfRtCallbacks.sCallbacks);
#endif #endif
Thread.[Friend]Init();
} }
[NoReturn] [NoReturn]

View file

@ -140,7 +140,7 @@ namespace System.Threading
SetStart((Delegate)start, maxStackSize); SetStart((Delegate)start, maxStackSize);
} }
static this() static void Init()
{ {
#unwarn #unwarn
RuntimeThreadInit runtimeThreadInitRef = ?; RuntimeThreadInit runtimeThreadInitRef = ?;