public override void Send(SendOrPostCallback d, object state) { var item = new CallbackItem(d, state); this.queue.Enqueue(item); Console.WriteLine("CockpitSynchronizationContext.Send() wait for execution handle. Id: " + item.Id); item.ExecutionCompleted.WaitOne(); if (item.Error != null) { throw item.Error; } }
public override void Post(SendOrPostCallback d, object state) { var item = new CallbackItem(d, state); this.queue.Enqueue(item); }