src/pmc/task.pmc - A concurrent task
The Task PMC represents a concurrent running "green thread".
Initialize a concurrency task object.
void init_pmc(PMC *data)
Initializes a new Task with a
Hash PMC with any or all of the keys:
opcode_t *invoke(void *next)
Invokes whatever is in the Task's associated code.
If the Task's data attribute is not null, pass it to the code as the first argument.
Create a copy of the task, resetting status, ID, and birthtime.
PMC *get_attr_str(STRING *name)
Gets the value of an attribute for this task.
void set_attr_str(STRING *name, PMC *value)
Sets the value of an attribute for this task.
Mark any referenced strings and PMCs.
void visit(PMC *info)
This is used by freeze/thaw to visit the contents of the task.
*info is the visit info,
void freeze(PMC *info)
Used to archive the task.
void thaw(PMC *info)
Used to unarchive the task.
void thawfinish(PMC *info)
Called after the task has been thawed.