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. More...
Public Member Functions | |
Fiber | ContinueWith (IEnumerator continuationCoroutine) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (IEnumerator continuationCoroutine, CancellationToken cancellationToken) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (IEnumerator continuationCoroutine, FiberContinuationOptions continuationOptions) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (IEnumerator continuationCoroutine, FiberScheduler scheduler) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (IEnumerator continuationCoroutine, CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber > continuationAction) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber > continuationAction, CancellationToken cancellationToken) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber > continuationAction, FiberContinuationOptions continuationOptions) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber > continuationAction, FiberScheduler scheduler) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber > continuationAction, CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber, object > continuationAction, object state) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber, object > continuationAction, object state, CancellationToken cancellationToken) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber, object > continuationAction, object state, FiberContinuationOptions continuationOptions) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber, object > continuationAction, object state, FiberScheduler scheduler) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber | ContinueWith (Action< Fiber, object > continuationAction, object state, CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler) |
Creates a continuation that executes asynchronously when the target fiber completes. More... | |
Fiber (IEnumerator coroutine) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
Fiber (IEnumerator coroutine, CancellationToken cancellationToken) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
Fiber (Action action) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
Fiber (Action action, CancellationToken cancellationToken) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
Fiber (Action< object > action, object state) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
Fiber (Action< object > action, object state, CancellationToken cancellationToken) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
Fiber (Func< FiberInstruction > func) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
Fiber (Func< FiberInstruction > func, CancellationToken cancellationToken) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
Fiber (Func< object, FiberInstruction > func, object state) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
Fiber (Func< object, FiberInstruction > func, object state, CancellationToken cancellationToken) | |
Initializes a new instance of the SpicyPixel.Threading.Fiber class. More... | |
void | Start () |
Start executing the fiber using the default scheduler on the thread. More... | |
void | Start (FiberScheduler scheduler) |
Start executing the fiber using the specified scheduler. More... | |
Static Public Member Functions | |
static Fiber | Delay (int millisecondsDelay) |
Crates a Fiber that waits for a delay before completing. More... | |
static Fiber | Delay (TimeSpan delay) |
Crates a Fiber that waits for a delay before completing. More... | |
static Fiber | Delay (TimeSpan delay, CancellationToken cancellationToken) |
Crates a Fiber that waits for a delay before completing. More... | |
static Fiber | Delay (int millisecondsDelay, CancellationToken cancellationToken) |
Crates a Fiber that waits for a delay before completing. More... | |
static Fiber | Delay (int millisecondsDelay, CancellationToken cancellationToken, FiberScheduler scheduler) |
Crates a Fiber that waits for a delay before completing. More... | |
static Fiber | WhenAll (params Fiber[] fibers) |
Returns a fiber that waits on all fibers to complete. More... | |
static Fiber | WhenAll (Fiber[] fibers, CancellationToken cancellationToken) |
Returns a fiber that waits on all fibers to complete. More... | |
static Fiber | WhenAll (Fiber[] fibers, TimeSpan timeout) |
Returns a fiber that waits on all fibers to complete. More... | |
static Fiber | WhenAll (Fiber[] fibers, int millisecondsTimeout) |
Returns a fiber that waits on all fibers to complete. More... | |
static Fiber | WhenAll (Fiber[] fibers, int millisecondsTimeout, CancellationToken cancellationToken) |
Returns a fiber that waits on all fibers to complete. More... | |
static Fiber | WhenAll (Fiber[] fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler) |
Returns a fiber that waits on all fibers to complete. More... | |
static Fiber | WhenAll (IEnumerable< Fiber > fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler) |
Returns a fiber that waits on all fibers to complete. More... | |
static Fiber | WhenAny (params Fiber[] fibers) |
Returns a fiber that completes when any fiber finishes. More... | |
static Fiber | WhenAny (Fiber[] fibers, CancellationToken cancellationToken) |
Returns a fiber that completes when any fiber finishes. More... | |
static Fiber | WhenAny (Fiber[] fibers, TimeSpan timeout) |
Returns a fiber that completes when any fiber finishes. More... | |
static Fiber | WhenAny (Fiber[] fibers, int millisecondsTimeout) |
Returns a fiber that completes when any fiber finishes. More... | |
static Fiber | WhenAny (Fiber[] fibers, int millisecondsTimeout, CancellationToken cancellationToken) |
Returns a fiber that completes when any fiber finishes. More... | |
static Fiber | WhenAny (Fiber[] fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler) |
Returns a fiber that completes when any fiber finishes. More... | |
static Fiber | WhenAny (IEnumerable< Fiber > fibers, int millisecondsTimeout, CancellationToken cancellationToken, FiberScheduler scheduler) |
Returns a fiber that completes when any fiber finishes. More... | |
Properties | |
static Fiber | CurrentFiber [get] |
Gets the currently executing fiber on this thread. More... | |
static FiberFactory | Factory [get] |
Gets the default factory for creating fibers. More... | |
IDictionary< string, object > | Properties [get] |
Gets user-defined properties associated with the fiber. More... | |
string | Name [get, set] |
Gets or sets the name. More... | |
object | ResultAsObject [get, set] |
Gets or sets the result of the fiber's execution as an object. More... | |
bool | IsCanceled [get] |
Gets a value indicating whether this instance is canceled. More... | |
bool | IsCompleted [get] |
Gets a value indicating whether this instance is completed. More... | |
bool | IsFaulted [get] |
Gets a value indicating whether this instance is faulted. More... | |
Exception | Exception [get] |
Gets the exception that led to the Faulted state. More... | |
FiberStatus | Status [get, set] |
Gets or sets the state of the fiber. More... | |
Fiber | Antecedent [get] |
Gets the antecedent, which is the fiber that this fiber was dependent upon for starting execution. More... | |
CancellationToken | CancellationToken [get] |
Gets the cancellation token for the Fiber. More... | |
int | Id [get] |
Gets the thread unique identifier for the fiber. More... | |
Detailed Description
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.
Definition at line 8 of file Fiber.ContinueWith.cs.
Constructor & Destructor Documentation
SpicyPixel.Threading.Fiber.Fiber | ( | IEnumerator | coroutine | ) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
coroutine A couroutine to execute on the fiber.
SpicyPixel.Threading.Fiber.Fiber | ( | IEnumerator | coroutine, |
CancellationToken | cancellationToken | ||
) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
coroutine A couroutine to execute on the fiber. cancellationToken Cancellation token.
SpicyPixel.Threading.Fiber.Fiber | ( | Action | action | ) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
action A non-blocking action to execute on the fiber.
SpicyPixel.Threading.Fiber.Fiber | ( | Action | action, |
CancellationToken | cancellationToken | ||
) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
action A non-blocking action to execute on the fiber. cancellationToken Cancellation token.
SpicyPixel.Threading.Fiber.Fiber | ( | Action< object > | action, |
object | state | ||
) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
action A non-blocking action to execute on the fiber. state State to pass to the action.
SpicyPixel.Threading.Fiber.Fiber | ( | Action< object > | action, |
object | state, | ||
CancellationToken | cancellationToken | ||
) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
action A non-blocking action to execute on the fiber. state State to pass to the action. cancellationToken Cancellation token.
SpicyPixel.Threading.Fiber.Fiber | ( | Func< FiberInstruction > | func | ) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
func A non-blocking function that returns a FiberInstruction when complete.
SpicyPixel.Threading.Fiber.Fiber | ( | Func< FiberInstruction > | func, |
CancellationToken | cancellationToken | ||
) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
func A non-blocking function that returns a FiberInstruction when complete. cancellationToken Cancellation token.
SpicyPixel.Threading.Fiber.Fiber | ( | Func< object, FiberInstruction > | func, |
object | state | ||
) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
func A non-blocking function that returns a FiberInstruction when complete. state State to pass to the function.
SpicyPixel.Threading.Fiber.Fiber | ( | Func< object, FiberInstruction > | func, |
object | state, | ||
CancellationToken | cancellationToken | ||
) |
Initializes a new instance of the SpicyPixel.Threading.Fiber class.
- Parameters
-
func A non-blocking function that returns a FiberInstruction when complete. state State to pass to the function. cancellationToken Cancellation token.
Member Function Documentation
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | IEnumerator | continuationCoroutine | ) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationCoroutine Continuation coroutine.
Definition at line 15 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | IEnumerator | continuationCoroutine, |
CancellationToken | cancellationToken | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationCoroutine Continuation coroutine. cancellationToken Cancellation token.
Definition at line 26 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | IEnumerator | continuationCoroutine, |
FiberContinuationOptions | continuationOptions | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationCoroutine Continuation coroutine. continuationOptions Continuation options.
Definition at line 37 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | IEnumerator | continuationCoroutine, |
FiberScheduler | scheduler | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationCoroutine Continuation coroutine. scheduler Scheduler.
Definition at line 48 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | IEnumerator | continuationCoroutine, |
CancellationToken | cancellationToken, | ||
FiberContinuationOptions | continuationOptions, | ||
FiberScheduler | scheduler | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationCoroutine Continuation coroutine. cancellationToken Cancellation token. continuationOptions Continuation options. scheduler Scheduler.
Definition at line 61 of file Fiber.ContinueWith.cs.
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action.
Definition at line 95 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | Action< Fiber > | continuationAction, |
CancellationToken | cancellationToken | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action. cancellationToken Cancellation token.
Definition at line 106 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | Action< Fiber > | continuationAction, |
FiberContinuationOptions | continuationOptions | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action. continuationOptions Continuation options.
Definition at line 117 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | Action< Fiber > | continuationAction, |
FiberScheduler | scheduler | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action. scheduler Scheduler.
Definition at line 128 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | Action< Fiber > | continuationAction, |
CancellationToken | cancellationToken, | ||
FiberContinuationOptions | continuationOptions, | ||
FiberScheduler | scheduler | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action. cancellationToken Cancellation token. continuationOptions Continuation options. scheduler Scheduler.
Definition at line 141 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | Action< Fiber, object > | continuationAction, |
object | state | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action. state State.
Definition at line 153 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | Action< Fiber, object > | continuationAction, |
object | state, | ||
CancellationToken | cancellationToken | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action. state State. cancellationToken Cancellation token.
Definition at line 165 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | Action< Fiber, object > | continuationAction, |
object | state, | ||
FiberContinuationOptions | continuationOptions | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action. state State. continuationOptions Continuation options.
Definition at line 177 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | Action< Fiber, object > | continuationAction, |
object | state, | ||
FiberScheduler | scheduler | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action. state State. scheduler Scheduler.
Definition at line 189 of file Fiber.ContinueWith.cs.
Fiber SpicyPixel.Threading.Fiber.ContinueWith | ( | Action< Fiber, object > | continuationAction, |
object | state, | ||
CancellationToken | cancellationToken, | ||
FiberContinuationOptions | continuationOptions, | ||
FiberScheduler | scheduler | ||
) |
Creates a continuation that executes asynchronously when the target fiber completes.
- Returns
- A fiber that executes when the target fiber completes.
- Parameters
-
continuationAction Continuation action. state State. cancellationToken Cancellation token. continuationOptions Continuation options. scheduler Scheduler.
Definition at line 203 of file Fiber.ContinueWith.cs.
|
static |
Crates a Fiber that waits for a delay before completing.
- Parameters
-
millisecondsDelay Milliseconds to delay.
Definition at line 13 of file Fiber.Delay.cs.
|
static |
Crates a Fiber that waits for a delay before completing.
- Parameters
-
delay Time span to delay.
Definition at line 22 of file Fiber.Delay.cs.
|
static |
Crates a Fiber that waits for a delay before completing.
- Parameters
-
delay Time span to delay. cancellationToken Cancellation token.
Definition at line 32 of file Fiber.Delay.cs.
|
static |
Crates a Fiber that waits for a delay before completing.
- Parameters
-
millisecondsDelay Milliseconds to delay. cancellationToken Cancellation token.
Definition at line 42 of file Fiber.Delay.cs.
|
static |
Crates a Fiber that waits for a delay before completing.
- Parameters
-
millisecondsDelay Milliseconds to delay. cancellationToken Cancellation token. scheduler Scheduler.
Definition at line 53 of file Fiber.Delay.cs.
void SpicyPixel.Threading.Fiber.Start | ( | ) |
void SpicyPixel.Threading.Fiber.Start | ( | FiberScheduler | scheduler | ) |
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.
- Returns
- A fiber that waits on all fibers to complete.
- Parameters
-
fibers Fibers to wait for completion.
Definition at line 20 of file Fiber.WhenAll.cs.
|
static |
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.
- Returns
- A fiber that waits on all fibers to complete.
- Parameters
-
fibers Fibers to wait for completion. cancellationToken Cancellation token.
Definition at line 35 of file Fiber.WhenAll.cs.
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.
- Returns
- A fiber that waits on all fibers to complete.
- Parameters
-
fibers Fibers to wait for completion. timeout Timeout.
Definition at line 50 of file Fiber.WhenAll.cs.
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.
- Returns
- A fiber that waits on all fibers to complete.
- Parameters
-
fibers Fibers to wait for completion. millisecondsTimeout Milliseconds timeout.
Definition at line 65 of file Fiber.WhenAll.cs.
|
static |
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.
- Returns
- A fiber that waits on all fibers to complete.
- Parameters
-
fibers Fibers to wait for completion. millisecondsTimeout Milliseconds timeout. cancellationToken Cancellation token.
Definition at line 81 of file Fiber.WhenAll.cs.
|
static |
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.
- Returns
- A fiber that waits on all fibers to complete.
- Parameters
-
fibers Fibers to wait for completion. millisecondsTimeout Milliseconds timeout. cancellationToken Cancellation token. scheduler Scheduler.
Definition at line 98 of file Fiber.WhenAll.cs.
|
static |
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.
- Returns
- A fiber that waits on all fibers to complete.
- Parameters
-
fibers Fibers to wait for completion. millisecondsTimeout Milliseconds timeout. cancellationToken Cancellation token. scheduler Scheduler.
Definition at line 123 of file Fiber.WhenAll.cs.
Returns a fiber that completes when any fiber finishes.
Fiber.ResultAsObject
will be the Fiber
that completed.
- Returns
- A fiber that completes when any fiber finishes.
- Parameters
-
fibers Fibers to wait for completion.
Definition at line 19 of file Fiber.WhenAny.cs.
|
static |
Returns a fiber that completes when any fiber finishes.
Fiber.ResultAsObject
will be the Fiber
that completed.
- Returns
- A fiber that completes when any fiber finishes.
- Parameters
-
fibers Fibers to wait for completion. cancellationToken Cancellation token.
Definition at line 33 of file Fiber.WhenAny.cs.
Returns a fiber that completes when any fiber finishes.
Fiber.ResultAsObject
will be the Fiber
that completed.
- Returns
- A fiber that completes when any fiber finishes.
- Parameters
-
fibers Fibers to wait for completion. timeout Timeout.
Definition at line 47 of file Fiber.WhenAny.cs.
Returns a fiber that completes when any fiber finishes.
Fiber.ResultAsObject
will be the Fiber
that completed.
- Returns
- A fiber that completes when any fiber finishes.
- Parameters
-
fibers Fibers to wait for completion. millisecondsTimeout Milliseconds timeout.
Definition at line 61 of file Fiber.WhenAny.cs.
|
static |
Returns a fiber that completes when any fiber finishes.
Fiber.ResultAsObject
will be the Fiber
that completed.
- Returns
- A fiber that completes when any fiber finishes.
- Parameters
-
fibers Fibers to wait for completion. millisecondsTimeout Milliseconds timeout. cancellationToken Cancellation token.
Definition at line 76 of file Fiber.WhenAny.cs.
|
static |
Returns a fiber that completes when any fiber finishes.
Fiber.ResultAsObject
will be the Fiber
that completed.
- Returns
- A fiber that completes when any fiber finishes.
- Parameters
-
fibers Fibers to wait for completion. millisecondsTimeout Milliseconds timeout. cancellationToken Cancellation token. scheduler Scheduler.
Definition at line 92 of file Fiber.WhenAny.cs.
|
static |
Returns a fiber that completes when any fiber finishes.
Fiber.ResultAsObject
will be the Fiber
that completed.
- Returns
- A fiber that completes when any fiber finishes.
- Parameters
-
fibers Fibers to wait for completion. millisecondsTimeout Milliseconds timeout. cancellationToken Cancellation token. scheduler Scheduler.
Definition at line 116 of file Fiber.WhenAny.cs.
Property Documentation
|
get |
|
get |
|
staticget |
|
get |
|
staticget |
|
get |
|
get |
|
get |
Gets a value indicating whether this instance is completed.
"Completed" means:
true
if this instance is completed; otherwise, false
.
|
get |
Gets a value indicating whether this instance is faulted.
See Fiber.Exception
for the exception causing the fault.
true
if this instance is faulted; otherwise, false
.
|
getset |
|
get |
Gets user-defined properties associated with the fiber.
Similar to thread local storage, callers may associate data with a fiber. A FiberStorage<T> class could retrieve data from the this property collection on the CurrentFiber.
Schedulers may also use this storage to associate additional data needed to perform scheduling operations.
The properties.
|
getset |
|
getset |
The documentation for this class was generated from the following files: