메소드 | 설명 | |
---|---|---|
Run ( |
Run the blocking scheduler loop and perform the specified number of updates per second. Not all schedulers support a blocking run loop that can be invoked by the caller. The system scheduler is designed so that a custom run loop could be implemented by a derived type. Everything used to execute Run() is available to a derived scheduler. |
|
StartNew ( ) : |
Starts a new thread, creates a scheduler, starts it running, and returns it to the calling thread.
|
|
StartNew ( |
Starts a new thread, creates a scheduler, starts it running, and returns it to the calling thread.
|
|
StartNew ( |
Starts a new thread, creates a scheduler, starts it running, and returns it to the calling thread.
|
|
StartNew ( |
Starts a new thread, creates a scheduler, starts it running, and returns it to the calling thread.
|
|
SystemFiberScheduler ( ) : System |
Initializes a new instance of the SpicyPixel.Threading.FiberScheduler class.
|
메소드 | 설명 | |
---|---|---|
Dispose ( bool disposing ) : void |
Dispose the scheduler. When the scheduler is disposed, the CancellationToken is set. |
|
GetNextFiberWakeTime ( float &fiberWakeTime ) : bool |
Gets the time of the first fiber wake up. This method is primarily useful when manually calling Update() instead of Run() to know how long the thread can sleep for. |
|
QueueFiber ( |
Queues the fiber for execution on the scheduler. Fibers queued from the scheduler thread will generally be executed inline whenever possible on most schedulers. |
|
Update ( float time ) : void |
Update the scheduler which causes all queued tasks to run for a cycle. This method is useful when updating the scheduler manually with a custom run loop instead of calling Run(Fiber, CancellationToken, float). |
메소드 | 설명 | |
---|---|---|
CancelWhenComplete ( |
||
ExecuteFiberInternal ( |
Executes the fiber. Fibers executed by this method do not belong to a queue and must be added to one by method end if the fiber execution did not complete this invocation. Otherwise, the fiber would fall off the scheduler. |
|
OnFiberInstruction ( |
||
QueueFiberForExecution ( |
Adds a fiber to the execution queue without inlining and sets the wait handle.
|
|
QueueFiberForSleep ( |
Adds a fiber to the sleep queue and sets the wait handle.
|
|
RemoveFiberFromQueues ( |
Removes a fiber from the current queues. The fiber being yielded to needs to be removed from the queues because it's about to be processed directly. |
|
UpdateExecutingFibers ( ) : void | ||
UpdateSleepingFibers ( ) : void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | /// Disposing is true when called manually, /// false when called by the finalizer. /// |
리턴 | void |
protected GetNextFiberWakeTime ( float &fiberWakeTime ) : bool | ||
fiberWakeTime | float | /// The time marker in seconds the first sleeping fiber needs to wake up. /// This is based on a previously passed time value to Update(). /// This value may be 0 if a sleeping fiber was aborted and /// therefore an update should process immediately. /// |
리턴 | bool |
protected final QueueFiber ( |
||
fiber | /// The fiber to queue. /// | |
리턴 | void |
public Run ( |
||
fiber |
/// The optional fiber to start execution from. If this is |
|
token | /// A cancellation token that can be used to stop execution. /// | |
updatesPerSecond | float |
/// Updates to all fibers per second. A value of |
리턴 | void |
public static StartNew ( |
||
token | /// A token to cancel the thread. /// | |
updatesPerSecond | float | /// Updates to run per second. /// |
리턴 |
public static StartNew ( |
||
fiber | /// A fiber to start execution from. /// | |
리턴 |
public static StartNew ( |
||
fiber | /// A fiber to start execution from. /// | |
token | /// A token to cancel the thread. /// | |
updatesPerSecond | float | /// Updates to run per second. /// |
리턴 |
protected Update ( float time ) : void | ||
time | float | /// Time in seconds since the scheduler or application began running. /// This value is used to determine when to wake sleeping fibers. /// Using float instead of TimeSpan spares the GC. /// |
리턴 | void |