22 class TaskRunnable : Runnable
26 readonly SendOrPostCallback post;
27 readonly
object state;
38 this.self =
self ??
throw new ArgumentNullException(nameof(
self));
39 this.post = post ??
throw new ArgumentNullException(nameof(post));
49 SetSynchronizationContext(
self);
54 SetSynchronizationContext(save);
60 readonly Executor executor;
69 this.executor = executor ??
throw new ArgumentNullException(nameof(executor));
72 public override void Post(SendOrPostCallback d,
object state)
74 executor.execute(
new TaskRunnable(
this, d, state));
TaskScheduler implementation that executes tasks on a Executor.
ExecutorSynchronizationContext(Executor executor)
Initializes a new instance.
override void Post(SendOrPostCallback d, object state)