C# Class SpicyPixel.Threading.FiberFactory

A Fiber Factory for creating fibers with the same options.
Show file Open project: spicypixel/concurrency-kit-cs Class Usage Examples

Public Methods

Method Description
FiberFactory ( ) : System

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

FiberFactory ( CancellationToken cancellationToken ) : System

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

FiberFactory ( CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler ) : System

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

FiberFactory ( FiberContinuationOptions continuationOptions ) : System

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

FiberFactory ( FiberScheduler scheduler ) : System

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

StartNew ( System.Action action ) : Fiber

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

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

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

StartNew ( System.Action action, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

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

StartNew ( System.Action action, FiberScheduler scheduler ) : Fiber

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

StartNew ( Action action, object state ) : Fiber

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

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

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

StartNew ( Action action, object state, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

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

StartNew ( Action action, object state, FiberScheduler scheduler ) : Fiber

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

StartNew ( Func func ) : Fiber

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

StartNew ( Func func, CancellationToken cancellationToken ) : Fiber

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

StartNew ( Func func, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

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

StartNew ( Func func, FiberScheduler scheduler ) : Fiber

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

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

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

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

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

StartNew ( FiberInstruction>.Func func, object state, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

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

StartNew ( FiberInstruction>.Func func, object state, FiberScheduler scheduler ) : Fiber

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

StartNew ( IEnumerator coroutine ) : Fiber

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

StartNew ( IEnumerator coroutine, CancellationToken cancellationToken ) : Fiber

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

StartNew ( IEnumerator coroutine, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber

Start executing a new fiber using the specified scheduler.

StartNew ( IEnumerator coroutine, FiberScheduler scheduler ) : Fiber

Start executing a new fiber using the specified scheduler.

Private Methods

Method Description
CheckContinuationOptions ( FiberContinuationOptions continuationOptions ) : void
GetScheduler ( ) : FiberScheduler

Method Details

FiberFactory() public method

Initializes a new instance of the SpicyPixel.Threading.FiberFactory class.
public FiberFactory ( ) : System
return System

FiberFactory() public method

Initializes a new instance of the SpicyPixel.Threading.FiberFactory class.
public FiberFactory ( CancellationToken cancellationToken ) : System
cancellationToken System.Threading.CancellationToken Cancellation token.
return System

FiberFactory() public method

Initializes a new instance of the SpicyPixel.Threading.FiberFactory class.
public FiberFactory ( CancellationToken cancellationToken, FiberContinuationOptions continuationOptions, FiberScheduler scheduler ) : System
cancellationToken System.Threading.CancellationToken Cancellation token.
continuationOptions FiberContinuationOptions Continuation options.
scheduler FiberScheduler Scheduler.
return System

FiberFactory() public method

Initializes a new instance of the SpicyPixel.Threading.FiberFactory class.
public FiberFactory ( FiberContinuationOptions continuationOptions ) : System
continuationOptions FiberContinuationOptions Continuation options.
return System

FiberFactory() public method

Initializes a new instance of the SpicyPixel.Threading.FiberFactory class.
public FiberFactory ( FiberScheduler scheduler ) : System
scheduler FiberScheduler Scheduler.
return System

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( System.Action action ) : Fiber
action System.Action /// A non-blocking action to execute on the fiber. ///
return Fiber

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( System.Action action, CancellationToken cancellationToken ) : Fiber
action System.Action /// A non-blocking action to execute on the fiber. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
return Fiber

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( System.Action action, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
action System.Action /// A non-blocking action to execute on the fiber. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( System.Action action, FiberScheduler scheduler ) : Fiber
action System.Action /// A non-blocking action to execute on the fiber. ///
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( Action action, object state ) : Fiber
action Action /// A non-blocking action to execute on the fiber. ///
state object /// State to pass to the action. ///
return Fiber

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( Action action, object state, CancellationToken cancellationToken ) : Fiber
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.
return Fiber

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( Action action, object state, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
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.
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( Action action, object state, FiberScheduler scheduler ) : Fiber
action Action /// A non-blocking action to execute on the fiber. ///
state object /// State to pass to the action. ///
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber

StartNew() public method

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public StartNew ( Func func ) : Fiber
func Func /// A non-blocking function that returns a when complete. ///
return Fiber

StartNew() public method

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public StartNew ( Func func, CancellationToken cancellationToken ) : Fiber
func Func /// A non-blocking function that returns a when complete. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
return Fiber

StartNew() public method

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public StartNew ( Func func, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
func Func /// A non-blocking function that returns a when complete. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber

StartNew() public method

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public StartNew ( Func func, FiberScheduler scheduler ) : Fiber
func Func /// A non-blocking function that returns a when complete. ///
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber

StartNew() public method

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public StartNew ( FiberInstruction>.Func func, object state ) : Fiber
func FiberInstruction>.Func /// A non-blocking function that returns a when complete. ///
state object /// State to pass to the function. ///
return Fiber

StartNew() public method

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public StartNew ( FiberInstruction>.Func func, object state, CancellationToken cancellationToken ) : Fiber
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.
return Fiber

StartNew() public method

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public StartNew ( FiberInstruction>.Func func, object state, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
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.
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber

StartNew() public method

Initializes a new instance of the SpicyPixel.Threading.Fiber class.
public StartNew ( FiberInstruction>.Func func, object state, FiberScheduler scheduler ) : Fiber
func FiberInstruction>.Func /// A non-blocking function that returns a when complete. ///
state object /// State to pass to the function. ///
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( IEnumerator coroutine ) : Fiber
coroutine IEnumerator /// A couroutine to execute on the fiber. ///
return Fiber

StartNew() public method

Start executing a new fiber using the default scheduler on the thread.
public StartNew ( IEnumerator coroutine, CancellationToken cancellationToken ) : Fiber
coroutine IEnumerator /// A couroutine to execute on the fiber. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
return Fiber

StartNew() public method

Start executing a new fiber using the specified scheduler.
public StartNew ( IEnumerator coroutine, CancellationToken cancellationToken, FiberScheduler scheduler ) : Fiber
coroutine IEnumerator /// A couroutine to execute on the fiber. ///
cancellationToken System.Threading.CancellationToken Cancellation token.
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber

StartNew() public method

Start executing a new fiber using the specified scheduler.
public StartNew ( IEnumerator coroutine, FiberScheduler scheduler ) : Fiber
coroutine IEnumerator /// A couroutine to execute on the fiber. ///
scheduler FiberScheduler /// A scheduler to execute the fiber on. ///
return Fiber