The clock that keep track of the current scheduling time.
The clock that keep track of the current scheduling time.
The currently executing coroutine (execute one at a time).
The currently executing coroutine (execute one at a time).
The activation time for the item in the time-ordered priority queue
The activation time for the item in the time-ordered priority queue
The future event list.
The future event list.
The current value of the Scheduler's clock.
The current value of the Scheduler's clock.
Compare the activation times of the two coroutines.
Compare the activation times of the two coroutines.
Compare two items (PQItems) based on their actTime.
Compare two items (PQItems) based on their actTime.
the other item to compare with this item
Terminates the coroutine, regardless of state.
Terminates the coroutine, regardless of state.
Show the flaw by printing the error message.
Show the flaw by printing the error message.
the method where the error occurred
the error message
Get the id (unique identifier).
Get the id (unique identifier).
Return the full identity.
Return the full identity.
Get the name.
Get the name.
If the coroutine is running, suspends the coroutine for a certain amount of time.
If the coroutine is running, suspends the coroutine for a certain amount
of time. If the coroutine is suspended, then begin execution again after
a certain amount of time. Time units depend on the coroutine scheduler.
If no coroutine scheduler is provided then the default,
Coroutine.defaultScheduler
, is used.
time delay before the coroutine is resumed
the coroutine scheduler
When the coroutine is finished executing its run
function, this
function is executed.
When the coroutine is finished executing its run
function, this
function is executed.
When the coroutine is started, this function is executed before the run
function.
When the coroutine is started, this function is executed before the run
function.
Implements for Scheduler mixin.
Implements for Scheduler mixin.
the coroutine to be scheduled
Causes this coroutine to restart execution.
Causes this coroutine to restart execution. If another coroutine is
currently being executed, then that coroutine is suspended before this
one is executed. If this coroutine has not already been started, then
this has the same effect as the run
function. It is important to note
that the state from any previous execution of this coroutine is not saved.
If the coroutine is suspended, it is resumed and continues its execution.
If the coroutine is suspended, it is resumed and continues its execution.
If the coroutine is in some other state, the behavior of this function is to be treated as undefined.
The scheduler itself is a coroutine and may be thought of as the director.
The scheduler itself is a coroutine and may be thought of as the director. The director iteratively manages the clock and the agenda of coroutines until the agenda becomes empty.
Set the name.
Get the type of the simulation object.
Get the type of the simulation object.
Causes this coroutine to begin execution.
Causes this coroutine to begin execution. If another coroutine is
currently being executed, then that coroutine is suspended before this
one is executed. If this coroutine has already been started, then this
has the same effect as the restart
function.
Current state of the coroutine.
Current state of the coroutine.
If the coroutine is running, it is suspended and makes no further progress unless and until it is resumed.
If the coroutine is running, it is suspended and makes no further progress unless and until it is resumed.
If the coroutine is in some other state, the behavior of this function is to be treated as undefined.
Convert the item (PQItem) to a string.
Convert the item (PQItem) to a string.
If the coroutine is running, suspend execution indefinitely and yield to another coroutine.
If the coroutine is running, suspend execution indefinitely and yield to another coroutine. If the other coroutine has never been started, then it is started.
If the coroutine is in some other state, the behavior of this function is to be treated as undefined.
the coroutine to yield to
This
PriorityScheduler
class provides a coroutine scheduler implementation that is backed by an instance of thePriorityQueue [Coroutine]
class.