C# Класс SpicyPixel.Threading.Fiber

A Fiber is a lightweight means of scheduling work that enables multiple units of processing to execute concurrently by co-operatively sharing execution time on a single thread. Fibers are also known as "micro-threads" and can be implemented using programming language facilities such as "coroutines".

Fibers simplify many concurrency issues generally associated with multithreading because a given fiber has complete control over when it yields execution to another fiber. A fiber does not need to manage resource locking or handle changing data in the same way as a thread does because access to a resource is never preempted by another fiber without co-operation.

Fibers can improve performance in certain applications with concurrency requirements. Because many fibers can run on a thread, this can relieve pressure on precious resources in the thread pool and reduce latency. Additionally, some applications have concurrent, interdependent processes that naturally lend themselves to co-operative scheduling which can result in greater efficiency when the application manages the context switch instead of a pre-emptive scheduler.

Fibers can also be a convenient way to express a state machine. The master fiber implementing the machine can test state conditions, start new fibers for state actions, yield to an action fiber until it completes, and then handle the transition out of the state and into a new state.

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CancelContinuation void
CheckTimeout int
DelayCoroutine IEnumerator
Execute FiberInstruction
FaultContinuation void
FinishCompletion void
Stop StopInstruction
WhenAllFibersCoroutine IEnumerator
WhenAllTasksCoroutine IEnumerator
WhenAnyFibersCoroutine IEnumerator
WhenAnyTasksCoroutine IEnumerator

Открытые методы

Метод Описание
ContinueWith ( object>.Action continuationAction, object state ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( object>.Action continuationAction, object state, CancellationToken cancellationToken ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( object>.Action continuationAction, object state, CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( object>.Action continuationAction, object state, FiberContinuationOptions continuationOptions ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( object>.Action continuationAction, object state, FiberScheduler scheduler ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( Action continuationAction ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( Action continuationAction, CancellationToken cancellationToken ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( Action continuationAction, CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( Action continuationAction, FiberContinuationOptions continuationOptions ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( Action continuationAction, FiberScheduler scheduler ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( IEnumerator continuationCoroutine ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( IEnumerator continuationCoroutine, CancellationToken cancellationToken ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( IEnumerator continuationCoroutine, CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( IEnumerator continuationCoroutine, FiberContinuationOptions continuationOptions ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

ContinueWith ( IEnumerator continuationCoroutine, FiberScheduler scheduler ) : Fiber

Creates a continuation that executes asynchronously when the target fiber completes.

Delay ( System.TimeSpan delay ) : Fiber

Crates a Fiber that waits for a delay before completing.

Delay ( System.TimeSpan delay, CancellationToken cancellationToken ) : Fiber

Crates a Fiber that waits for a delay before completing.

Delay ( int millisecondsDelay ) : Fiber

Crates a Fiber that waits for a delay before completing.

Delay ( int millisecondsDelay, CancellationToken cancellationToken ) : Fiber

Crates a Fiber that waits for a delay before completing.

Delay ( int millisecondsDelay, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Crates a Fiber that waits for a delay before completing.

Fiber ( System.Action action ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Fiber ( System.Action action, CancellationToken cancellationToken ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Fiber ( Action action, object state ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Fiber ( Action action, object state, CancellationToken cancellationToken ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Fiber ( Func func ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Fiber ( Func func, CancellationToken cancellationToken ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Fiber ( FiberInstruction>.Func func, object state ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Fiber ( FiberInstruction>.Func func, object state, CancellationToken cancellationToken ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Fiber ( IEnumerator coroutine ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Fiber ( IEnumerator coroutine, CancellationToken cancellationToken ) : System

Initializes a new instance of the SpicyPixel.Threading.Fiber class.

Start ( ) : void

Start executing the fiber using the default scheduler on the thread.

Start ( FiberScheduler scheduler ) : void

Start executing the fiber using the specified scheduler.

This method is safe to call from any thread even if different than the scheduler execution thread.

ThrowIfCanceled ( ) : void

Throws if canceled.

ThrowIfCanceledOrFaulted ( ) : void

Throws if canceled or faulted.

ThrowIfFaulted ( ) : void

Throws if faulted.

WhenAll ( ) : Fiber

Returns a fiber that waits on all fibers to complete.

`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.

WhenAll ( Fiber fibers, CancellationToken cancellationToken ) : Fiber

Returns a fiber that waits on all fibers to complete.

`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.

WhenAll ( Fiber fibers, System.TimeSpan timeout ) : Fiber

Returns a fiber that waits on all fibers to complete.

`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.

WhenAll ( Fiber fibers, int millisecondsTimeout ) : Fiber

Returns a fiber that waits on all fibers to complete.

`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.

WhenAll ( Fiber fibers, int millisecondsTimeout, CancellationToken cancellationToken ) : Fiber

Returns a fiber that waits on all fibers to complete.

`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.

WhenAll ( Fiber fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Returns a fiber that waits on all fibers to complete.

`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.

WhenAll ( IEnumerable fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Returns a fiber that waits on all fibers to complete.

`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.

WhenAll ( IEnumerable tasks, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Returns a fiber that waits on all tasks to complete.

`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.

WhenAll ( System.Threading.Task tasks, CancellationToken cancellationToken ) : Fiber

Returns a fiber that waits on all tasks to complete.

`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.

WhenAll ( System.Threading.Task tasks, System.TimeSpan timeout ) : Fiber

Returns a fiber that waits on all tasks to complete.

`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.

WhenAll ( System.Threading.Task tasks, int millisecondsTimeout ) : Fiber

Returns a fiber that waits on all tasks to complete.

`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.

WhenAll ( System.Threading.Task tasks, int millisecondsTimeout, CancellationToken cancellationToken ) : Fiber

Returns a fiber that waits on all tasks to complete.

`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.

WhenAll ( System.Threading.Task tasks, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Returns a fiber that waits on all tasks to complete.

`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.

WhenAny ( ) : Fiber

Returns a fiber that completes when any fiber finishes.

`Fiber.ResultAsObject` will be the `Fiber` that completed.

WhenAny ( Fiber fibers, CancellationToken cancellationToken ) : Fiber

Returns a fiber that completes when any fiber finishes.

`Fiber.ResultAsObject` will be the `Fiber` that completed.

WhenAny ( Fiber fibers, System.TimeSpan timeout ) : Fiber

Returns a fiber that completes when any fiber finishes.

`Fiber.ResultAsObject` will be the `Fiber` that completed.

WhenAny ( Fiber fibers, int millisecondsTimeout ) : Fiber

Returns a fiber that completes when any fiber finishes.

`Fiber.ResultAsObject` will be the `Fiber` that completed.

WhenAny ( Fiber fibers, int millisecondsTimeout, CancellationToken cancellationToken ) : Fiber

Returns a fiber that completes when any fiber finishes.

`Fiber.ResultAsObject` will be the `Fiber` that completed.

WhenAny ( Fiber fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Returns a fiber that completes when any fiber finishes.

`Fiber.ResultAsObject` will be the `Fiber` that completed.

WhenAny ( IEnumerable fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Returns a fiber that completes when any fiber finishes.

`Fiber.ResultAsObject` will be the `Fiber` that completed.

WhenAny ( IEnumerable tasks, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Returns a fiber that completes when any task finishes.

`Fiber.ResultAsObject` will be the `Task` that completed.

WhenAny ( System.Threading.Task tasks, CancellationToken cancellationToken ) : Fiber

Returns a fiber that completes when any task finishes.

`Fiber.ResultAsObject` will be the `Task` that completed.

WhenAny ( System.Threading.Task tasks, System.TimeSpan timeout ) : Fiber

Returns a fiber that completes when any task finishes.

`Fiber.ResultAsObject` will be the `Task` that completed.

WhenAny ( System.Threading.Task tasks, int millisecondsTimeout ) : Fiber

Returns a fiber that completes when any task finishes.

`Fiber.ResultAsObject` will be the `Task` that completed.

WhenAny ( System.Threading.Task tasks, int millisecondsTimeout, CancellationToken cancellationToken ) : Fiber

Returns a fiber that completes when any task finishes.

`Fiber.ResultAsObject` will be the `Task` that completed.

WhenAny ( System.Threading.Task tasks, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Returns a fiber that completes when any task finishes.

`Fiber.ResultAsObject` will be the `Task` that completed.

Приватные методы

Метод Описание
CancelContinuation ( ) : void

Called by a continuation to cancel the task and trigger other continuations.

CheckTimeout ( System.TimeSpan timeout ) : int
DelayCoroutine ( int millisecondsDelay, CancellationToken cancellationToken ) : IEnumerator
Execute ( ) : FiberInstruction

Executes the fiber until it ends or yields.

FaultContinuation ( Exception exception ) : void

Faults the continuation.

FinishCompletion ( ) : void

Run to finish transitioning to Completed by execution continuations.

Stop ( FiberStatus finalStatus ) : StopInstruction
WhenAllFibersCoroutine ( IEnumerable fibers, int millisecondsTimeout, CancellationToken cancellationToken ) : IEnumerator
WhenAllTasksCoroutine ( IEnumerable tasks, int millisecondsTimeout, CancellationToken cancellationToken ) : IEnumerator
WhenAnyFibersCoroutine ( IEnumerable fibers, int millisecondsTimeout, CancellationToken cancellationToken ) : IEnumerator
WhenAnyTasksCoroutine ( IEnumerable tasks, int millisecondsTimeout, CancellationToken cancellationToken ) : IEnumerator

Описание методов

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( object>.Action continuationAction, object state ) : Fiber
continuationAction object>.Action Continuation action.
state object State.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( object>.Action continuationAction, object state, CancellationToken cancellationToken ) : Fiber
continuationAction object>.Action Continuation action.
state object State.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( object>.Action continuationAction, object state, CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler ) : Fiber
continuationAction object>.Action Continuation action.
state object State.
cancellationToken System.Threading.CancellationToken Cancellation token.
continuationOptions FiberContinuationOptions Continuation options.
scheduler FiberScheduler Scheduler.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( object>.Action continuationAction, object state, FiberContinuationOptions continuationOptions ) : Fiber
continuationAction object>.Action Continuation action.
state object State.
continuationOptions FiberContinuationOptions Continuation options.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( object>.Action continuationAction, object state, FiberScheduler scheduler ) : Fiber
continuationAction object>.Action Continuation action.
state object State.
scheduler FiberScheduler Scheduler.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( Action continuationAction ) : Fiber
continuationAction Action Continuation action.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( Action continuationAction, CancellationToken cancellationToken ) : Fiber
continuationAction Action Continuation action.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( Action continuationAction, CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler ) : Fiber
continuationAction Action Continuation action.
cancellationToken System.Threading.CancellationToken Cancellation token.
continuationOptions FiberContinuationOptions Continuation options.
scheduler FiberScheduler Scheduler.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( Action continuationAction, FiberContinuationOptions continuationOptions ) : Fiber
continuationAction Action Continuation action.
continuationOptions FiberContinuationOptions Continuation options.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( Action continuationAction, FiberScheduler scheduler ) : Fiber
continuationAction Action Continuation action.
scheduler FiberScheduler Scheduler.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( IEnumerator continuationCoroutine ) : Fiber
continuationCoroutine IEnumerator Continuation coroutine.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( IEnumerator continuationCoroutine, CancellationToken cancellationToken ) : Fiber
continuationCoroutine IEnumerator Continuation coroutine.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( IEnumerator continuationCoroutine, CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler ) : Fiber
continuationCoroutine IEnumerator Continuation coroutine.
cancellationToken System.Threading.CancellationToken Cancellation token.
continuationOptions FiberContinuationOptions Continuation options.
scheduler FiberScheduler Scheduler.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( IEnumerator continuationCoroutine, FiberContinuationOptions continuationOptions ) : Fiber
continuationCoroutine IEnumerator Continuation coroutine.
continuationOptions FiberContinuationOptions Continuation options.
Результат Fiber

ContinueWith() публичный Метод

Creates a continuation that executes asynchronously when the target fiber completes.
public ContinueWith ( IEnumerator continuationCoroutine, FiberScheduler scheduler ) : Fiber
continuationCoroutine IEnumerator Continuation coroutine.
scheduler FiberScheduler Scheduler.
Результат Fiber

Delay() публичный статический Метод

Crates a Fiber that waits for a delay before completing.
public static Delay ( System.TimeSpan delay ) : Fiber
delay System.TimeSpan Time span to delay.
Результат Fiber

Delay() публичный статический Метод

Crates a Fiber that waits for a delay before completing.
public static Delay ( System.TimeSpan delay, CancellationToken cancellationToken ) : Fiber
delay System.TimeSpan Time span to delay.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

Delay() публичный статический Метод

Crates a Fiber that waits for a delay before completing.
public static Delay ( int millisecondsDelay ) : Fiber
millisecondsDelay int Milliseconds to delay.
Результат Fiber

Delay() публичный статический Метод

Crates a Fiber that waits for a delay before completing.
public static Delay ( int millisecondsDelay, CancellationToken cancellationToken ) : Fiber
millisecondsDelay int Milliseconds to delay.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

Delay() публичный статический Метод

Crates a Fiber that waits for a delay before completing.
public static Delay ( int millisecondsDelay, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
millisecondsDelay int Milliseconds to delay.
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler Scheduler.
Результат Fiber

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( System.Action action ) : System
action System.Action /// A non-blocking action to execute on the fiber. ///
Результат System

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( System.Action action, CancellationToken cancellationToken ) : System
action System.Action /// A non-blocking action to execute on the fiber. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат System

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( Action action, object state ) : System
action Action /// A non-blocking action to execute on the fiber. ///
state object /// State to pass to the action. ///
Результат System

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( Action action, object state, CancellationToken cancellationToken ) : System
action Action /// A non-blocking action to execute on the fiber. ///
state object /// State to pass to the action. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат System

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( Func func ) : System
func Func /// A non-blocking function that returns a when complete. ///
Результат System

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( Func func, CancellationToken cancellationToken ) : System
func Func /// A non-blocking function that returns a when complete. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат System

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( FiberInstruction>.Func func, object state ) : System
func FiberInstruction>.Func /// A non-blocking function that returns a when complete. ///
state object /// State to pass to the function. ///
Результат System

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( FiberInstruction>.Func func, object state, CancellationToken cancellationToken ) : System
func FiberInstruction>.Func /// A non-blocking function that returns a when complete. ///
state object /// State to pass to the function. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат System

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( IEnumerator coroutine ) : System
coroutine IEnumerator /// A couroutine to execute on the fiber. ///
Результат System

Fiber() публичный Метод

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public Fiber ( IEnumerator coroutine, CancellationToken cancellationToken ) : System
coroutine IEnumerator /// A couroutine to execute on the fiber. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат System

Start() публичный Метод

Start executing the fiber using the default scheduler on the thread.
public Start ( ) : void
Результат void

Start() публичный Метод

Start executing the fiber using the specified scheduler.
This method is safe to call from any thread even if different than the scheduler execution thread.
public Start ( FiberScheduler scheduler ) : void
scheduler FiberScheduler /// The scheduler to start the fiber on. ///
Результат void

ThrowIfCanceled() публичный Метод

Throws if canceled.
public ThrowIfCanceled ( ) : void
Результат void

ThrowIfCanceledOrFaulted() публичный Метод

Throws if canceled or faulted.
public ThrowIfCanceledOrFaulted ( ) : void
Результат void

ThrowIfFaulted() публичный Метод

Throws if faulted.
public ThrowIfFaulted ( ) : void
Результат void

WhenAll() публичный статический Метод

Returns a fiber that waits on all fibers to complete.
`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.
public static WhenAll ( ) : Fiber
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all fibers to complete.
`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.
public static WhenAll ( Fiber fibers, CancellationToken cancellationToken ) : Fiber
fibers Fiber Fibers to wait for completion.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all fibers to complete.
`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.
public static WhenAll ( Fiber fibers, System.TimeSpan timeout ) : Fiber
fibers Fiber Fibers to wait for completion.
timeout System.TimeSpan Timeout.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all fibers to complete.
`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.
public static WhenAll ( Fiber fibers, int millisecondsTimeout ) : Fiber
fibers Fiber Fibers to wait for completion.
millisecondsTimeout int Milliseconds timeout.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all fibers to complete.
`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.
public static WhenAll ( Fiber fibers, int millisecondsTimeout, CancellationToken cancellationToken ) : Fiber
fibers Fiber Fibers to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all fibers to complete.
`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.
public static WhenAll ( Fiber fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
fibers Fiber Fibers to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler Scheduler.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all fibers to complete.
`Fiber.ResultAsObject` will be `true` if all fibers complete successfully or `false` if cancelled or timeout.
public static WhenAll ( IEnumerable fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
fibers IEnumerable Fibers to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler Scheduler.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all tasks to complete.
`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.
public static WhenAll ( IEnumerable tasks, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
tasks IEnumerable Tasks to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler Scheduler.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all tasks to complete.
`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.
public static WhenAll ( System.Threading.Task tasks, CancellationToken cancellationToken ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all tasks to complete.
`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.
public static WhenAll ( System.Threading.Task tasks, System.TimeSpan timeout ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
timeout System.TimeSpan Timeout.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all tasks to complete.
`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.
public static WhenAll ( System.Threading.Task tasks, int millisecondsTimeout ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
millisecondsTimeout int Milliseconds timeout.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all tasks to complete.
`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.
public static WhenAll ( System.Threading.Task tasks, int millisecondsTimeout, CancellationToken cancellationToken ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

WhenAll() публичный статический Метод

Returns a fiber that waits on all tasks to complete.
`Fiber.ResultAsObject` will be `true` if all tasks complete successfully or `false` if cancelled or timeout.
public static WhenAll ( System.Threading.Task tasks, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler Scheduler.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any fiber finishes.
`Fiber.ResultAsObject` will be the `Fiber` that completed.
public static WhenAny ( ) : Fiber
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any fiber finishes.
`Fiber.ResultAsObject` will be the `Fiber` that completed.
public static WhenAny ( Fiber fibers, CancellationToken cancellationToken ) : Fiber
fibers Fiber Fibers to wait for completion.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any fiber finishes.
`Fiber.ResultAsObject` will be the `Fiber` that completed.
public static WhenAny ( Fiber fibers, System.TimeSpan timeout ) : Fiber
fibers Fiber Fibers to wait for completion.
timeout System.TimeSpan Timeout.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any fiber finishes.
`Fiber.ResultAsObject` will be the `Fiber` that completed.
public static WhenAny ( Fiber fibers, int millisecondsTimeout ) : Fiber
fibers Fiber Fibers to wait for completion.
millisecondsTimeout int Milliseconds timeout.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any fiber finishes.
`Fiber.ResultAsObject` will be the `Fiber` that completed.
public static WhenAny ( Fiber fibers, int millisecondsTimeout, CancellationToken cancellationToken ) : Fiber
fibers Fiber Fibers to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any fiber finishes.
`Fiber.ResultAsObject` will be the `Fiber` that completed.
public static WhenAny ( Fiber fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
fibers Fiber Fibers to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler Scheduler.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any fiber finishes.
`Fiber.ResultAsObject` will be the `Fiber` that completed.
public static WhenAny ( IEnumerable fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
fibers IEnumerable Fibers to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler Scheduler.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any task finishes.
`Fiber.ResultAsObject` will be the `Task` that completed.
public static WhenAny ( IEnumerable tasks, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
tasks IEnumerable Tasks to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler Scheduler.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any task finishes.
`Fiber.ResultAsObject` will be the `Task` that completed.
public static WhenAny ( System.Threading.Task tasks, CancellationToken cancellationToken ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any task finishes.
`Fiber.ResultAsObject` will be the `Task` that completed.
public static WhenAny ( System.Threading.Task tasks, System.TimeSpan timeout ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
timeout System.TimeSpan Timeout.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any task finishes.
`Fiber.ResultAsObject` will be the `Task` that completed.
public static WhenAny ( System.Threading.Task tasks, int millisecondsTimeout ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
millisecondsTimeout int Milliseconds timeout.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any task finishes.
`Fiber.ResultAsObject` will be the `Task` that completed.
public static WhenAny ( System.Threading.Task tasks, int millisecondsTimeout, CancellationToken cancellationToken ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
Результат Fiber

WhenAny() публичный статический Метод

Returns a fiber that completes when any task finishes.
`Fiber.ResultAsObject` will be the `Task` that completed.
public static WhenAny ( System.Threading.Task tasks, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
tasks System.Threading.Task Tasks to wait for completion.
millisecondsTimeout int Milliseconds timeout.
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler Scheduler.
Результат Fiber