| parrotcode parrotthread PMC | |
| Docs | FAQ | Download | Examples | Talks | Resources | Perl 6 | Languages | Who's Who | Donors | Cage Cleaners | Wiki | |
src/pmc/parrotthread.pmc - Threaded Interpreter
ParrotThread extends ParrotInterpreter to provide a threaded interpreter which supports:
new P2, "ParrotThread" # create new threaded interp
find_method P0, P2, "thread3" # thread-run function
find_global P5, "_th1" # locate thread function
invoke # run thread
set I0, P2 # get thread id
and these methods:
thread1
thread2
thread3 # start thread of type 1..3
join
detach
yield
kill
thread_id = thread.'run'(CLONE_FLAGS, sub, args...)Run the thread. This object is morphed into an appropriate ParrotRunningThread PMC. The CLONE_FLAGS are or'd together values taken from cloneflags.pasm.
thread_id = thread.'run_clone'(sub, args...)Equivalent to calling run with PARROT_CLONE_DEFAULT.
void init()Initializes the thread.
void init_pmc(PMC *parent)Create a new thread by cloning the passed interpreter.
2003.12.18 leo initial review.
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|