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;
 }
 public ActionWithStateAndContextScheduledTask(AbstractScheduledEventExecutor executor,
     Action<object, object> action, object context, object state, PreciseDeadline deadline)
     : base(executor, deadline, new TaskCompletionSource(state))
 {
     _action = action;
     _context = context;
 }
Пример #3
0
 protected ScheduledAsyncTask(AbstractScheduledEventExecutor executor, PreciseDeadline deadline,
     TaskCompletionSource promise, CancellationToken cancellationToken)
     : base(executor, deadline, promise)
 {
     _cancellationToken = cancellationToken;
     _cancellationTokenRegistration = cancellationToken.Register(CancellationAction, this);
 }
Пример #4
0
 protected ScheduledTask(AbstractScheduledEventExecutor executor, PreciseDeadline deadline,
     TaskCompletionSource promise)
 {
     Executor = executor;
     Deadline = deadline;
     Promise = promise;
 }
 public StateActionScheduledTask(AbstractScheduledEventExecutor executor, Action<object> action, object state, PreciseTimeSpan deadline)
     : base(executor, deadline, new TaskCompletionSource(state))
 {
     this.action = action;
 }
 public RunnableScheduledTask(AbstractScheduledEventExecutor executor, IRunnable action, PreciseTimeSpan deadline)
     : base(executor, deadline, new TaskCompletionSource())
 {
     this.action = action;
 }
Пример #7
0
 public RunnableScheduledTask(AbstractScheduledEventExecutor executor, IRunnable action, long deadlineNanos, long periodNanos)
     : base(executor, deadlineNanos, periodNanos, executor.NewPromise())
 {
     _action = action;
 }
Пример #8
0
 public RunnableScheduledTask(AbstractScheduledEventExecutor executor, IRunnable action, PreciseTimeSpan deadline)
     : base(executor, deadline, new TaskCompletionSource())
 {
     this.action = action;
 }
Пример #9
0
 public ActionScheduledAsyncTask(AbstractScheduledEventExecutor executor, Action action, PreciseDeadline deadline,
     CancellationToken cancellationToken)
     : base(executor, deadline, new TaskCompletionSource(), cancellationToken)
 {
     _action = action;
 }
 public ActionWithStateScheduledAsyncTask(AbstractScheduledEventExecutor executor, Action<object> action,
     object state, PreciseDeadline deadline, CancellationToken cancellationToken)
     : base(executor, deadline, new TaskCompletionSource(state), cancellationToken)
 {
     _action = action;
 }
Пример #11
0
 public ActionScheduledTask(AbstractScheduledEventExecutor executor, Action action, PreciseDeadline deadline)
     : base(executor, deadline, new TaskCompletionSource())
 {
     _action = action;
 }
Пример #12
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);
 }
Пример #13
0
 public RunnableScheduledTask(AbstractScheduledEventExecutor executor, IRunnable action, in PreciseTimeSpan deadline)