Skip to content

Commit

Permalink
Added a flag to indicate if Dispatcher is inited.
Browse files Browse the repository at this point in the history
  • Loading branch information
creeperlv committed Feb 18, 2022
1 parent 31ee03f commit eb776ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CLUNL.Unity3D/Sync/Dispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ public class Dispatcher
//static ImmutableQueue<Action> iactions = ImmutableQueue<Action>.Empty;
static ConcurrentQueue<Action> actions = new ConcurrentQueue<Action>();
static object _lock = new object();
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool Inited()
{
return init;
}
static bool init = false;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void MarkInit()
{
init = true;
}
/// <summary>
/// Call to perform a sync operation every frame.
/// </summary>
Expand Down

0 comments on commit eb776ab

Please sign in to comment.