OneThreadSynchronizationContext.cs 252 B

123456789101112
  1. using System.Threading;
  2. namespace Model
  3. {
  4. public class OneThreadSynchronizationContext : SynchronizationContext
  5. {
  6. public override void Post(SendOrPostCallback callback, object state)
  7. {
  8. Game.Poller.Add(() => { callback(state); });
  9. }
  10. }
  11. }