|
CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
|
Classes | |
| class | Parallel |
| Provides support for parallel loops and regions. More... | |
| class | ParallelLoopResult |
| Provides completion status of a Parallel loop. More... | |
| class | ParallelOptions |
| Stores options that configure the operation of methods on the Parallel class. More... | |
| class | ResultTask |
| A Task specialization that returns a result value upon completion. More... | |
| class | ResultValueTask |
| Represents a hybrid task-like type that can wrap either a direct result value or a ResultTask<T>. More... | |
| class | Task |
| Represents an asynchronous operation that can be awaited and composed with other tasks. More... | |
| class | TaskScheduler |
| Represents an object that handles the low-level work of queuing tasks onto threads. More... | |
| class | ValueTask |
| Provides an awaitable result of an asynchronous operation. More... | |
Enumerations | |
| enum class | TaskStatus { Created = 0 , WaitingForActivation = 1 , WaitingToRun = 2 , Running = 3 , WaitingForChildrenToComplete = 4 , RanToCompletion = 5 , Canceled = 6 , Faulted = 7 } |
Functions | |
| TaskPtr | Delay (int32_t millisecondsDelay) |
| Creates a task that completes after a time delay. More... | |
| TaskPtr | Delay (int32_t millisecondsDelay, const CancellationToken &cancellationToken) |
| Creates a task that completes after a time delay and can be cancelled. More... | |
| TaskPtr | FromCanceled (const CancellationToken &cancellationToken) |
| Creates a task that has completed due to cancellation with the specified token. More... | |
| TaskPtr | FromException (const Exception &exception) |
| Creates a task that has completed with a specified exception. More... | |
| template<typename TResult > | |
| RTaskPtr< TResult > | FromException (const Exception &exception) |
| Creates a task that has completed with a specified exception and result type. More... | |
| template<typename TResult > | |
| RTaskPtr< TResult > | FromResult (TResult result) |
| Creates a task that has successfully completed with the specified result. More... | |
| TaskPtr | Run (const Action<> &action) |
| Queues the specified work to run on the thread pool and returns a Task handle for that work. More... | |
| TaskPtr | Run (const Action<> &action, const CancellationToken &cancellationToken) |
| Queues the specified work to run on the thread pool and returns a Task handle for that work. More... | |
| TaskPtr | Run (const Func< TaskPtr > &function) |
| Queues the specified work to run on the thread pool and returns a proxy for the Task returned by the function. More... | |
| template<typename TResult > | |
| RTaskPtr< TResult > | Run (const Func< TResult > &function) |
| Queues the specified work to run on the thread pool and returns a Task<TResult> handle for that work. More... | |
| void | WaitAll (const ArrayPtr< TaskPtr > &tasks, const CancellationToken &cancellationToken) |
| Waits for all of the provided Task objects to complete execution. More... | |
| void | WaitAll (const ArrayPtr< TaskPtr > &tasks) |
| Waits for all of the provided Task objects to complete execution. More... | |
| int32_t | WaitAny (const ArrayPtr< TaskPtr > &tasks, const CancellationToken &cancellationToken) |
| Waits for any of the provided Task objects to complete execution. More... | |
| int32_t | WaitAny (const ArrayPtr< TaskPtr > &tasks) |
| Waits for any of the provided Task objects to complete execution. More... | |
| TaskPtr | WhenAll (const ArrayPtr< TaskPtr > &tasks) |
| Creates a task that will complete when all of the supplied tasks have completed. More... | |
| TaskPtr | WhenAll (const SharedPtr< Collections::Generic::IEnumerable< TaskPtr > > &tasks) |
| Creates a task that will complete when all of the supplied tasks have completed. More... | |
| template<typename TResult > | |
| RTaskPtr< ArrayPtr< TResult > > | WhenAll (const SharedPtr< Collections::Generic::IEnumerable< RTaskPtr< TResult > > > &tasks) |
| Creates a task that will complete when all of the supplied tasks have completed. More... | |
| template<typename TResult > | |
| RTaskPtr< ArrayPtr< TResult > > | WhenAll (const ArrayPtr< RTaskPtr< TResult > > &tasks) |
| Creates a task that will complete when all of the supplied tasks have completed. More... | |
| RTaskPtr< TaskPtr > | WhenAny (const SharedPtr< Collections::Generic::IEnumerable< TaskPtr > > &tasks) |
| Creates a task that will complete when any of the supplied tasks have completed. More... | |
| RTaskPtr< TaskPtr > | WhenAny (const ArrayPtr< TaskPtr > &tasks) |
| Creates a task that will complete when any of the supplied tasks have completed. More... | |
| template<typename TResult > | |
| RTaskPtr< RTaskPtr< TResult > > | WhenAny (const ArrayPtr< RTaskPtr< TResult > > &tasks) |
| Creates a task that will complete when any of the supplied tasks have completed. More... | |
| template<typename TResult > | |
| RTaskPtr< RTaskPtr< TResult > > | WhenAny (const SharedPtr< Collections::Generic::IEnumerable< RTaskPtr< TResult > > > &tasks) |
| Creates a task that will complete when any of the supplied tasks have completed. More... | |
| Runtime::CompilerServices::YieldAwaitable | Yield () |
| Creates an awaitable task that asynchronously yields back to the current context when awaited. More... | |
|
strong |
| TaskPtr System::Threading::Tasks::Delay | ( | int32_t | millisecondsDelay | ) |
Creates a task that completes after a time delay.
| millisecondsDelay | The number of milliseconds to wait before completing the returned task, or -1 to wait indefinitely. |
| System.ArgumentOutOfRangeException | if the millisecondsDelay argument is less than -1. |
| TaskPtr System::Threading::Tasks::Delay | ( | int32_t | millisecondsDelay, |
| const CancellationToken & | cancellationToken | ||
| ) |
Creates a task that completes after a time delay and can be cancelled.
| millisecondsDelay | The number of milliseconds to wait before completing the returned task, or -1 to wait indefinitely. |
| cancellationToken | The cancellation token that can be used to cancel the delay. |
| System.ArgumentOutOfRangeException | if the millisecondsDelay argument is less than -1. |
| TaskPtr System::Threading::Tasks::FromCanceled | ( | const CancellationToken & | cancellationToken | ) |
Creates a task that has completed due to cancellation with the specified token.
| cancellationToken | The cancellation token that caused the task to be cancelled. |
Creates a task that has completed with a specified exception.
| exception | The exception with which to complete the task. |
| RTaskPtr< TResult > System::Threading::Tasks::FromException | ( | const Exception & | exception | ) |
Creates a task that has completed with a specified exception and result type.
| TResult | The type of the task's result. |
| exception | The exception with which to complete the task. |
| RTaskPtr< TResult > System::Threading::Tasks::FromResult | ( | TResult | result | ) |
Creates a task that has successfully completed with the specified result.
| TResult | The type of the task's result. |
| result | The result value with which to complete the task. |
| TaskPtr System::Threading::Tasks::Run | ( | const Action<> & | action, |
| const CancellationToken & | cancellationToken | ||
| ) |
Queues the specified work to run on the thread pool and returns a Task handle for that work.
| action | The work to execute asynchronously. |
| cancellationToken | A cancellation token that can be used to cancel the work if it has not yet started. |
| RTaskPtr< TResult > System::Threading::Tasks::Run | ( | const Func< TResult > & | function | ) |
Queues the specified work to run on the thread pool and returns a Task<TResult> handle for that work.
| TResult | The type of the result returned by the task. |
| function | The work to execute asynchronously. |
| void System::Threading::Tasks::WaitAll | ( | const ArrayPtr< TaskPtr > & | tasks, |
| const CancellationToken & | cancellationToken | ||
| ) |
Waits for all of the provided Task objects to complete execution.
| tasks | An array of Task instances on which to wait. |
| cancellationToken | A CancellationToken to observe while waiting for the tasks to complete. |
| System.OperationCanceledException | if the cancellationToken is cancelled. |
| int32_t System::Threading::Tasks::WaitAny | ( | const ArrayPtr< TaskPtr > & | tasks, |
| const CancellationToken & | cancellationToken | ||
| ) |
Waits for any of the provided Task objects to complete execution.
| tasks | An array of Task instances on which to wait. |
| cancellationToken | A CancellationToken to observe while waiting for the tasks to complete. |
| System.OperationCanceledException | if the cancellationToken is cancelled. |
| RTaskPtr< ArrayPtr< TResult > > System::Threading::Tasks::WhenAll | ( | const ArrayPtr< RTaskPtr< TResult > > & | tasks | ) |
Creates a task that will complete when all of the supplied tasks have completed.
| TResult | The type of the completed tasks' results. |
| tasks | The tasks to wait on for completion. |
Creates a task that will complete when all of the supplied tasks have completed.
| tasks | The tasks to wait on for completion. |
| RTaskPtr< ArrayPtr< TResult > > System::Threading::Tasks::WhenAll | ( | const SharedPtr< Collections::Generic::IEnumerable< RTaskPtr< TResult > > > & | tasks | ) |
Creates a task that will complete when all of the supplied tasks have completed.
| TResult | The type of the completed tasks' results. |
| tasks | The tasks to wait on for completion. |
| TaskPtr System::Threading::Tasks::WhenAll | ( | const SharedPtr< Collections::Generic::IEnumerable< TaskPtr > > & | tasks | ) |
Creates a task that will complete when all of the supplied tasks have completed.
| tasks | The tasks to wait on for completion. |
| RTaskPtr< RTaskPtr< TResult > > System::Threading::Tasks::WhenAny | ( | const ArrayPtr< RTaskPtr< TResult > > & | tasks | ) |
Creates a task that will complete when any of the supplied tasks have completed.
| TResult | The type of the completed task's result. |
| tasks | The tasks to wait on for completion. |
Creates a task that will complete when any of the supplied tasks have completed.
| tasks | The tasks to wait on for completion. |
| RTaskPtr< RTaskPtr< TResult > > System::Threading::Tasks::WhenAny | ( | const SharedPtr< Collections::Generic::IEnumerable< RTaskPtr< TResult > > > & | tasks | ) |
Creates a task that will complete when any of the supplied tasks have completed.
| TResult | The type of the completed task's result. |
| tasks | The tasks to wait on for completion. |
| RTaskPtr< TaskPtr > System::Threading::Tasks::WhenAny | ( | const SharedPtr< Collections::Generic::IEnumerable< TaskPtr > > & | tasks | ) |
Creates a task that will complete when any of the supplied tasks have completed.
| tasks | The tasks to wait on for completion. |
| Runtime::CompilerServices::YieldAwaitable System::Threading::Tasks::Yield | ( | ) |
Creates an awaitable task that asynchronously yields back to the current context when awaited.
This method is useful for forcing an asynchronous method to yield control, allowing other pending work to be processed before continuing.