Task Class (System.Threading.Tasks) (original) (raw)
Task(Action, CancellationToken, TaskCreationOptions)
Initializes a new Task with the specified action and creation options.
Task(Action, CancellationToken)
Initializes a new Task with the specified action and CancellationToken.
Task(Action, TaskCreationOptions)
Initializes a new Task with the specified action and creation options.
Initializes a new Task with the specified action.
Task(Action, Object, CancellationToken, TaskCreationOptions)
Initializes a new Task with the specified action, state, and options.
Task(Action, Object, CancellationToken)
Initializes a new Task with the specified action, state, and CancellationToken.
Task(Action, Object, TaskCreationOptions)
Initializes a new Task with the specified action, state, and options.
Initializes a new Task with the specified action and state.
Configures an awaiter used to await this Task.
ConfigureAwait(ConfigureAwaitOptions)
Configures an awaiter used to await this Task.
ContinueWith(Action<Task,Object>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler)
Creates a continuation that receives caller-supplied state information and a cancellation token and that executes when the target Task completes. The continuation executes based on a set of specified conditions and uses a specified scheduler.
ContinueWith(Action<Task,Object>, Object, CancellationToken)
Creates a continuation that receives caller-supplied state information and a cancellation token and that executes asynchronously when the target Task completes.
ContinueWith(Action<Task,Object>, Object, TaskContinuationOptions)
Creates a continuation that receives caller-supplied state information and executes when the target Task completes. The continuation executes based on a set of specified conditions.
ContinueWith(Action<Task,Object>, Object, TaskScheduler)
Creates a continuation that receives caller-supplied state information and executes asynchronously when the target Task completes. The continuation uses a specified scheduler.
ContinueWith(Action<Task,Object>, Object)
Creates a continuation that receives caller-supplied state information and executes when the target Task completes.
ContinueWith(Action, CancellationToken, TaskContinuationOptions, TaskScheduler)
Creates a continuation that executes when the target task competes according to the specified TaskContinuationOptions. The continuation receives a cancellation token and uses a specified scheduler.
ContinueWith(Action, CancellationToken)
Creates a continuation that receives a cancellation token and executes asynchronously when the target Task completes.
ContinueWith(Action, TaskContinuationOptions)
Creates a continuation that executes when the target task completes according to the specified TaskContinuationOptions.
ContinueWith(Action, TaskScheduler)
Creates a continuation that executes asynchronously when the target Task completes. The continuation uses a specified scheduler.
Creates a continuation that executes asynchronously when the target Task completes.
Creates a continuation that executes based on the specified task continuation options when the target Task completes and returns a value. The continuation receives caller-supplied state information and a cancellation token and uses the specified scheduler.
ContinueWith(Func<Task,Object,TResult>, Object, CancellationToken)
Creates a continuation that executes asynchronously when the target Task completes and returns a value. The continuation receives caller-supplied state information and a cancellation token.
ContinueWith(Func<Task,Object,TResult>, Object, TaskContinuationOptions)
Creates a continuation that executes based on the specified task continuation options when the target Task completes. The continuation receives caller-supplied state information.
ContinueWith(Func<Task,Object,TResult>, Object, TaskScheduler)
Creates a continuation that executes asynchronously when the target Task completes. The continuation receives caller-supplied state information and uses a specified scheduler.
ContinueWith(Func<Task,Object,TResult>, Object)
Creates a continuation that receives caller-supplied state information and executes asynchronously when the target Task completes and returns a value.
ContinueWith(Func<Task,TResult>, CancellationToken, TaskContinuationOptions, TaskScheduler)
Creates a continuation that executes according to the specified continuation options and returns a value. The continuation is passed a cancellation token and uses a specified scheduler.
ContinueWith(Func<Task,TResult>, CancellationToken)
Creates a continuation that executes asynchronously when the target Task completes and returns a value. The continuation receives a cancellation token.
ContinueWith(Func<Task,TResult>, TaskContinuationOptions)
Creates a continuation that executes according to the specified continuation options and returns a value.
ContinueWith(Func<Task,TResult>, TaskScheduler)
Creates a continuation that executes asynchronously when the target Task completes and returns a value. The continuation uses a specified scheduler.
ContinueWith(Func<Task,TResult>)
Creates a continuation that executes asynchronously when the target Task completes and returns a value.
Delay(Int32, CancellationToken)
Creates a cancellable task that completes after a specified number of milliseconds.
Creates a task that completes after a specified number of milliseconds.
Delay(TimeSpan, CancellationToken)
Creates a cancellable task that completes after a specified time interval.
Delay(TimeSpan, TimeProvider, CancellationToken)
Creates a cancellable task that completes after a specified time interval.
Creates a task that completes after a specified time interval.
Creates a task that completes after a specified time interval.
Releases all resources used by the current instance of the Task class.
Disposes the Task, releasing all of its unmanaged resources.
Determines whether the specified object is equal to the current object.
(Inherited from Object)
FromCanceled(CancellationToken)
Creates a Task that's completed due to cancellation with a specified cancellation token.
FromCanceled(CancellationToken)
Creates a Task that's completed due to cancellation with a specified cancellation token.
Creates a Task that has completed with a specified exception.
Creates a Task that's completed with a specified exception.
Creates a Task that's completed successfully with the specified result.
Gets an awaiter used to await this Task.
Serves as the default hash function.
(Inherited from Object)
Gets the Type of the current instance.
(Inherited from Object)
Creates a shallow copy of the current Object.
(Inherited from Object)
Run(Action, CancellationToken)
Queues the specified work to run on the thread pool and returns a Task object that represents that work. A cancellation token allows the work to be cancelled if it has not yet started.
Queues the specified work to run on the thread pool and returns a Task object that represents that work.
Queues the specified work to run on the thread pool and returns a proxy for the task returned by function
. A cancellation token allows the work to be cancelled if it has not yet started.
Queues the specified work to run on the thread pool and returns a proxy for the task returned by function
.
Run(Func<Task>, CancellationToken)
Queues the specified work to run on the thread pool and returns a proxy for the Task(TResult)
returned by function
.
Queues the specified work to run on the thread pool and returns a proxy for the Task(TResult)
returned by function
. A cancellation token allows the work to be cancelled if it has not yet started.
Queues the specified work to run on the thread pool and returns a Task(TResult)
object that represents that work.
Queues the specified work to run on the thread pool and returns a Task object that represents that work. A cancellation token allows the work to be cancelled if it has not yet started.
Runs the Task synchronously on the current TaskScheduler.
RunSynchronously(TaskScheduler)
Runs the Task synchronously on the TaskScheduler provided.
Starts the Task, scheduling it for execution to the current TaskScheduler.
Starts the Task, scheduling it for execution to the specified TaskScheduler.
Returns a string that represents the current object.
(Inherited from Object)
Waits for the Task to complete execution.
Waits for the Task to complete execution. The wait terminates if a cancellation token is canceled before the task completes.
Wait(Int32, CancellationToken)
Waits for the Task to complete execution. The wait terminates if a timeout interval elapses or a cancellation token is canceled before the task completes.
Waits for the Task to complete execution within a specified number of milliseconds.
Wait(TimeSpan, CancellationToken)
Waits for the Task to complete execution.
Waits for the Task to complete execution within a specified time interval.
WaitAll(IEnumerable, CancellationToken)
Waits for all of the provided Task objects to complete execution unless the wait is cancelled.
Waits for all of the provided Task objects to complete execution.
WaitAll(Task[], CancellationToken)
Waits for all of the provided Task objects to complete execution unless the wait is cancelled.
WaitAll(Task[], Int32, CancellationToken)
Waits for all of the provided Task objects to complete execution within a specified number of milliseconds or until the wait is cancelled.
Waits for all of the provided Task objects to complete execution within a specified number of milliseconds.
Waits for all of the provided cancellable Task objects to complete execution within a specified time interval.
Waits for all of the provided Task objects to complete execution.
WaitAny(Task[], CancellationToken)
Waits for any of the provided Task objects to complete execution unless the wait is cancelled.
WaitAny(Task[], Int32, CancellationToken)
Waits for any of the provided Task objects to complete execution within a specified number of milliseconds or until a cancellation token is cancelled.
Waits for any of the provided Task objects to complete execution within a specified number of milliseconds.
Waits for any of the provided Task objects to complete execution within a specified time interval.
Waits for any of the provided Task objects to complete execution.
Gets a Task that will complete when this Task completes or when the specified CancellationToken has cancellation requested.
WaitAsync(TimeSpan, CancellationToken)
Gets a Task that will complete when this Task completes, when the specified timeout expires, or when the specified CancellationToken has cancellation requested.
WaitAsync(TimeSpan, TimeProvider, CancellationToken)
Gets a Task that will complete when this Task completes, when the specified timeout expires, or when the specified CancellationToken has cancellation requested.
WaitAsync(TimeSpan, TimeProvider)
Gets a Task that will complete when this Task completes or when the specified timeout expires.
Gets a Task that will complete when this Task completes or when the specified timeout expires.
Creates a task that will complete when all of the Task objects in an enumerable collection have completed.
Creates a task that will complete when all of the supplied tasks have completed.
Creates a task that will complete when all of the Task objects in an array have completed.
Creates a task that will complete when all of the Task objects in an enumerable collection have completed.
Creates a task that will complete when all of the supplied tasks have completed.
Creates a task that will complete when all of the Task objects in an array have completed.
Creates a task that will complete when any of the supplied tasks have completed.
Creates a task that will complete when any of the supplied tasks have completed.
Creates a task that will complete when either of the supplied tasks have completed.
Creates a task that will complete when any of the supplied tasks have completed.
Creates a task that will complete when any of the supplied tasks have completed.
Creates a task that will complete when any of the supplied tasks have completed.
Creates a task that will complete when either of the supplied tasks have completed.
Creates a task that will complete when any of the supplied tasks have completed.
Creates an IAsyncEnumerable that will yield the supplied tasks as those tasks complete.
Creates an IAsyncEnumerable that will yield the supplied tasks as those tasks complete.
Creates an IAsyncEnumerable that will yield the supplied tasks as those tasks complete.
Creates an IAsyncEnumerable that will yield the supplied tasks as those tasks complete.
Creates an IAsyncEnumerable that will yield the supplied tasks as those tasks complete.
Creates an IAsyncEnumerable that will yield the supplied tasks as those tasks complete.
Creates an awaitable task that asynchronously yields back to the current context when awaited.