From bea4fe007aa491e8f3cb9a85c88f9da7b7190707 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 24 Jun 2021 09:24:41 -0700 Subject: [PATCH] Fixed static init/deinit priority for Thread.Current --- BeefLibs/corlib/src/Runtime.bf | 2 +- BeefLibs/corlib/src/Threading/Thread.bf | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BeefLibs/corlib/src/Runtime.bf b/BeefLibs/corlib/src/Runtime.bf index 564b032c..ce7933c1 100644 --- a/BeefLibs/corlib/src/Runtime.bf +++ b/BeefLibs/corlib/src/Runtime.bf @@ -5,7 +5,7 @@ using System.Threading; namespace System { - [StaticInitPriority(100)] + [StaticInitPriority(101)] static class Runtime { const int32 cVersion = 8; diff --git a/BeefLibs/corlib/src/Threading/Thread.bf b/BeefLibs/corlib/src/Threading/Thread.bf index b83b2cdd..39e9fa26 100644 --- a/BeefLibs/corlib/src/Threading/Thread.bf +++ b/BeefLibs/corlib/src/Threading/Thread.bf @@ -8,6 +8,7 @@ namespace System.Threading public delegate void ThreadStart(); public delegate void ParameterizedThreadStart(Object obj); + [StaticInitPriority(100)] public sealed class Thread { private int mInternalThread; @@ -21,7 +22,7 @@ namespace System.Threading bool mAutoDelete; public static Thread sMainThread = new Thread() ~ delete _; - [StaticInitPriority(101)] + [StaticInitPriority(102)] struct RuntimeThreadInit { static Object Thread_Alloc()