public StateActionWithContextScheduledAsyncTask(AbstractScheduledEventExecutor executor, Action <object, object> action, object context, object state,
                                                 PreciseTimeSpan deadline, CancellationToken cancellationToken)
     : base(executor, deadline, new TaskCompletionSource(state), cancellationToken)
 {
     this.action  = action;
     this.context = context;
 }
Exemplo n.º 2
0
 public ActionScheduledAsyncTask(AbstractScheduledEventExecutor executor, Action action, PreciseTimeSpan deadline, CancellationToken cancellationToken)
     : base(executor, deadline, new TaskCompletionSource(), cancellationToken)
 {
     this.action = action;
 }
Exemplo n.º 3
0
 public StateActionScheduledTask(AbstractScheduledEventExecutor executor, Action <object> action, object state, PreciseTimeSpan deadline)
     : base(executor, deadline, new TaskCompletionSource(state))
 {
     this.action = action;
 }
Exemplo n.º 4
0
 protected ScheduledAsyncTask(AbstractScheduledEventExecutor executor, PreciseTimeSpan deadline, TaskCompletionSource promise, CancellationToken cancellationToken)
     : base(executor, deadline, promise)
 {
     this.cancellationToken             = cancellationToken;
     this.cancellationTokenRegistration = cancellationToken.Register(s => ((ScheduledAsyncTask)s).Cancel(), this);
 }
Exemplo n.º 5
0
 protected ScheduledTask(AbstractScheduledEventExecutor executor, PreciseTimeSpan deadline, TaskCompletionSource promise)
 {
     this.Executor = executor;
     this.Promise  = promise;
     this.Deadline = deadline;
 }
Exemplo n.º 6
0
 public ActionScheduledTask(AbstractScheduledEventExecutor executor, Action action, PreciseTimeSpan deadline)
     : base(executor, deadline, new TaskCompletionSource())
 {
     this.action = action;
 }