FiberTaskExtensions.cs
Go to the documentation of this file.
73 public static Task ContinueWith (this Task task, IEnumerator coroutine, TaskContinuationOptions continuationOptions)
75 return ContinueWith (task, coroutine, CancellationToken.None, continuationOptions, TaskScheduler.Current);
93 public static Task ContinueWith (this Task task, IEnumerator coroutine, CancellationToken cancellationToken)
95 return ContinueWith (task, coroutine, cancellationToken, TaskContinuationOptions.None, TaskScheduler.Current);
113 public static Task ContinueWith (this Task task, IEnumerator coroutine, TaskScheduler scheduler)
115 return ContinueWith (task, coroutine, CancellationToken.None, TaskContinuationOptions.None, scheduler);
139 public static Task ContinueWith (this Task task, IEnumerator coroutine, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
146 throw new ArgumentException ("The scheduler for a YieldableTask must be a FiberTaskScheduler", "scheduler");
163 var yieldableTask = new YieldableTask(coroutine, cancellationToken, TaskCreationOptions.AttachedToParent);
200 public static Task ContinueWith (this Task task, FiberInstruction instruction, TaskContinuationOptions continuationOptions)
202 return ContinueWith (task, instruction, CancellationToken.None, continuationOptions, TaskScheduler.Current);
220 public static Task ContinueWith (this Task task, FiberInstruction instruction, CancellationToken cancellationToken)
222 return ContinueWith (task, instruction, cancellationToken, TaskContinuationOptions.None, TaskScheduler.Current);
240 public static Task ContinueWith (this Task task, FiberInstruction instruction, TaskScheduler scheduler)
242 return ContinueWith (task, instruction, CancellationToken.None, TaskContinuationOptions.None, scheduler);
266 public static Task ContinueWith (this Task task, FiberInstruction instruction, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
273 throw new ArgumentException ("The scheduler for a YieldableTask must be a FiberTaskScheduler", "scheduler");
290 var yieldableTask = new YieldableTask(instruction, cancellationToken, TaskCreationOptions.AttachedToParent);
309 return StartNew (taskFactory, coroutine, taskFactory.CancellationToken, taskFactory.CreationOptions, taskFactory.Scheduler);
327 public static Task StartNew (this TaskFactory taskFactory, IEnumerator coroutine, CancellationToken cancellationToken)
329 return StartNew (taskFactory, coroutine, cancellationToken, taskFactory.CreationOptions, taskFactory.Scheduler);
347 public static Task StartNew (this TaskFactory taskFactory, IEnumerator coroutine, TaskCreationOptions creationOptions)
349 return StartNew (taskFactory, coroutine, taskFactory.CancellationToken, creationOptions, taskFactory.Scheduler);
373 public static Task StartNew (this TaskFactory taskFactory, IEnumerator coroutine, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
394 return StartNew (taskFactory, instruction, taskFactory.CancellationToken, taskFactory.CreationOptions, taskFactory.Scheduler);
412 public static Task StartNew (this TaskFactory taskFactory, FiberInstruction instruction, CancellationToken cancellationToken)
414 return StartNew (taskFactory, instruction, cancellationToken, taskFactory.CreationOptions, taskFactory.Scheduler);
432 public static Task StartNew (this TaskFactory taskFactory, FiberInstruction instruction, TaskCreationOptions creationOptions)
434 return StartNew (taskFactory, instruction, taskFactory.CancellationToken, creationOptions, taskFactory.Scheduler);
458 public static Task StartNew (this TaskFactory taskFactory, FiberInstruction instruction, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
static Task ContinueWith(this Task task, IEnumerator coroutine, CancellationToken cancellationToken)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:93
Yieldable task for execution on a fiber.
Definition: YieldableTask.cs:41
static TaskScheduler Current
Definition: TaskScheduler.cs:86
static Task StartNew(this TaskFactory taskFactory, FiberInstruction instruction, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
Creates a new task and starts executing it.
Definition: FiberTaskExtensions.cs:458
static Task ContinueWith(this Task task, IEnumerator coroutine)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:53
static Task ContinueWith(this Task task, FiberInstruction instruction, CancellationToken cancellationToken)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:220
static Task ContinueWith(this Task task, FiberInstruction instruction, TaskScheduler scheduler)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:240
static Task ContinueWith(this Task task, IEnumerator coroutine, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:139
static Task StartNew(this TaskFactory taskFactory, IEnumerator coroutine, CancellationToken cancellationToken)
Creates a new task and starts executing it.
Definition: FiberTaskExtensions.cs:327
static Task ContinueWith(this Task task, IEnumerator coroutine, TaskContinuationOptions continuationOptions)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:73
static Task StartNew(this TaskFactory taskFactory, FiberInstruction instruction)
Creates a new task and starts executing it.
Definition: FiberTaskExtensions.cs:392
Definition: AggregateException.cs:31
TaskContinuationOptions
Definition: TaskContinuationOptions.cs:31
Represents a fiber instruction to be processed by a FiberScheduler.
Definition: FiberInstruction.cs:43
Extends the Task and TaskFactory classes with methods to support coroutines.
Definition: FiberTaskExtensions.cs:39
static TaskScheduler Default
Definition: TaskScheduler.cs:80
static Task StartNew(this TaskFactory taskFactory, IEnumerator coroutine, TaskCreationOptions creationOptions)
Creates a new task and starts executing it.
Definition: FiberTaskExtensions.cs:347
static Task ContinueWith(this Task task, FiberInstruction instruction, TaskContinuationOptions continuationOptions)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:200
static Task ContinueWith(this Task task, FiberInstruction instruction, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:266
static CancellationToken None
Definition: CancellationToken.cs:52
static Task StartNew(this TaskFactory taskFactory, IEnumerator coroutine, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
Creates a new task and starts executing it.
Definition: FiberTaskExtensions.cs:373
static Task StartNew(this TaskFactory taskFactory, FiberInstruction instruction, CancellationToken cancellationToken)
Creates a new task and starts executing it.
Definition: FiberTaskExtensions.cs:412
Definition: IStructuralComparable.cs:33
static Task ContinueWith(this Task task, IEnumerator coroutine, TaskScheduler scheduler)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:113
static Task ContinueWith(this Task task, FiberInstruction instruction)
Continues the task with a coroutine.
Definition: FiberTaskExtensions.cs:180
Definition: Fiber.ContinueWith.cs:6
static Task StartNew(this TaskFactory taskFactory, IEnumerator coroutine)
Creates a new task and starts executing it.
Definition: FiberTaskExtensions.cs:307
static Task StartNew(this TaskFactory taskFactory, FiberInstruction instruction, TaskCreationOptions creationOptions)
Creates a new task and starts executing it.
Definition: FiberTaskExtensions.cs:432
Definition: AotInterlocked.cs:3
Definition: Task.cs:43
TaskScheduler that can execute fibers (yieldable coroutines).
Definition: FiberTaskScheduler.cs:40