| parrotcode parrotrunningthread PMC | |
| Docs | FAQ | Download | Examples | Talks | Resources | Perl 6 | Languages | Who's Who | Donors | Cage Cleaners | Wiki | |
src/pmc/parrotrunningthread.pmc -- Represents a running Parrot Thread.
This type represents a running parrot thread.
It provides the following methods: - join - detach - kill
Note that a running thread object becomes invalid when a thread finishes while detached or joined. Further operations on the object may have unexpected behavior, such as manipulating an unrelated thread.
void init()Create a new, invalid handle to a running thread.
void init_pmc(PMC *tid)Create a new running thread referring to the thread with the Thread ID specified in tid.
INTVAL get_integer()Return the thread ID of this thread.
void set_integer_native(INTVAL new_tid)Change the thread ID we refer to to new_tid.
*/
VTABLE void set_integer_native(INTVAL new_tid) {
PMC_int_val(SELF) = new_tid;
}
/*
METHOD join()Join the thread, returning whatever its main method returns.
METHOD detach()Detach the thread so it cannot be joined and will free its resources immediatelly when it exits.
METHOD kill()Terminate a running thread.
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|