NAME

src/pmc/scheduler.pmc - The concurrency scheduler

DESCRIPTION

Implements the core concurrency scheduler.

Vtable Functions

void init()
Initializes a concurrency scheduler object.
void init_pmc(PMC *data)
Initializes a new Scheduler with a Hash PMC with any or all of the keys:
id
An Integer representing the unique identifier for this scheduler.
void push_pmc(PMC *value)
Inserts a task into the task list, giving it a task ID one higher than the current maximum, and a birthtime of the current time.
PMC *pop_pmc()
Retrieves the next task from the task list. If the task index is invalid, recalculates it before retrieving the next task.
INTVAL get_integer()
Retrieves the number of pending tasks in the scheduler's task list.
void destroy()
Frees the scheduler's underlying struct.
void mark()
Marks any referenced strings and PMCs as live.
void visit(PMC *info)
Visits the contents of the scheduler (used by freeze/thaw).*info is the visit info (see include/parrot/pmc_freeze.h).
void freeze(PMC *info)
Archives the scheduler.
void thaw(PMC *info)
Unarchives the scheduler.
void thawfinish(PMC *info)
Finishes thawing the scheduler.

Methods

METHOD active_tasks()
Returns a ResizablePMCArray containing pointers to all active tasks.

SEE ALSO

docs/pdds/pdd25_concurrency.pod.