Added: Global access to main thread reference

This commit is contained in:
alexiscatnip
2022-02-06 13:06:57 +08:00
parent 6d1e5682b6
commit 45812c12b1
2 changed files with 17 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
using System.Threading;
namespace Raindrop.Services.Bootstrap
{
public class Globals
{
public static Thread GMainThread;
public static bool isOnMainThread()
{
return Globals.GMainThread.Equals(System.Threading.Thread.CurrentThread);
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d6787858bea64308a56b7107d7065b94
timeCreated: 1643349729