diff options
Diffstat (limited to 'modules/mono/glue/cs_files/GodotSynchronizationContext.cs')
-rw-r--r-- | modules/mono/glue/cs_files/GodotSynchronizationContext.cs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/modules/mono/glue/cs_files/GodotSynchronizationContext.cs b/modules/mono/glue/cs_files/GodotSynchronizationContext.cs deleted file mode 100644 index da3c7bac83..0000000000 --- a/modules/mono/glue/cs_files/GodotSynchronizationContext.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Threading; - -namespace Godot -{ - 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 void ExecutePendingContinuations() - { - KeyValuePair<SendOrPostCallback, object> workItem; - while (queue.TryTake(out workItem)) - { - workItem.Key(workItem.Value); - } - } - } -} |