NAME
src/pmc/task.pmc - A concurrent task
DESCRIPTION
The Task PMC represents a concurrent running "green thread".
Functions
- void init()Initialize a concurrency task object.
- void init_pmc(PMC *data)Initializes a new Task with a
- birthtimeThe time at which this Task was created.
- codeAn
- dataSome data that will be passed to
- 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.
- PMC *clone()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.
- void mark()Mark any referenced strings and PMCs.
- void visit(PMC *info)This is used by freeze/thaw to visit the contents of the task.
- 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.
Hash PMC with any or all of the keys:
invokable PMC related to this task.
code when invoked.*info is the visit info,
(see include/parrot/pmc_freeze.h).
Methdods
- METHOD send(PMC *message) Send a message to this task.
- METHOD kill() Kill this task.
SEE ALSO
docs/pdds/pdd15_objects.pod.
