NAME
src/pmc/parrotrunningthread.pmc -- Represents a running Parrot Thread.
DESCRIPTION
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.
Methods
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 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 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 immediately when it exits.
METHOD kill()
Terminate a running thread.
tid
.
new_tid
.