You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
[Mono] Tabs -> Spaces
This commit is contained in:
@@ -4,22 +4,22 @@ using System.Threading;
|
||||
|
||||
namespace Godot
|
||||
{
|
||||
public class GodotSynchronizationContext : SynchronizationContext
|
||||
{
|
||||
private readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> queue = new BlockingCollection<KeyValuePair<SendOrPostCallback, object>>();
|
||||
public class GodotSynchronizationContext : SynchronizationContext
|
||||
{
|
||||
private readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> queue = new BlockingCollection<KeyValuePair<SendOrPostCallback, object>>();
|
||||
|
||||
public override void Post(SendOrPostCallback d, object state)
|
||||
{
|
||||
queue.Add(new KeyValuePair<SendOrPostCallback, object>(d, state));
|
||||
}
|
||||
public override void Post(SendOrPostCallback d, object state)
|
||||
{
|
||||
queue.Add(new KeyValuePair<SendOrPostCallback, object>(d, state));
|
||||
}
|
||||
|
||||
public void ExecutePendingContinuations()
|
||||
{
|
||||
KeyValuePair<SendOrPostCallback, object> workItem;
|
||||
while (queue.TryTake(out workItem))
|
||||
{
|
||||
workItem.Key(workItem.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void ExecutePendingContinuations()
|
||||
{
|
||||
KeyValuePair<SendOrPostCallback, object> workItem;
|
||||
while (queue.TryTake(out workItem))
|
||||
{
|
||||
workItem.Key(workItem.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user