"Charles Reiss" <[EMAIL PROTECTED]> wrote:
Since I don't think the three-tiered threading system is going to be
implemented very soon, I'd like to propose that thread creation
instead be done with one new method of a ParrotThread object:
=item C<thread_id = thread_object.'thread'(flags, subroutine,
arguments...)>
Maybe we should go for a name that's more descriptive of what's happening,
such as "new_thread"?
However, I'm not too sure whether this is the best answer. Maybe it would
be better to create a thread object for a thread that you intend to spawn,
just as you instantiate any other PMC, perhaps with some flags and the sub
being given as arguments to the constructor. Then perhaps use the invoke
v-table methods, invoking it like a sub, to actually spawn the new thread.
This way the thread object is around to call methods on to get its status,
change its priority etc. I guess invoking an already started thread again
would be an exception...
Jonathan