NAME ^

src/pmc/parrotthread.pmc - Threaded Interpreter

DESCRIPTION ^

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

Methods ^

void init()

Initializes the thread.

void init_pmc(PMC *parent)

Create a new thread by cloning the passed interpreter.

HISTORY ^

2003.12.18 leo initial review.


parrot