>[I think this belongs on the language list, FWIW, Cc'd there]
>
>I like this, but I'd like to see this, inter-thread queues, and events
all 
>use the same communication method. Overload filehandles to pass events

>around instead, so:

I'm proposing that events and threads be dropped in lieu of coroutines.
 I view events and threads as low-level attempts to implement what coroutines
express elegantly.

There would be two perl run-times, one event-based and the other thread
based, much like java green threads and native threads.

> Invoking the coroutine could use another keyword,
>perhaps invoke, that returns the filehandle the coroutine talks on. So:

>
>   $fh = invoke foo("1", "2", "3")

As I tried to explain in the RFC, the "invoke" keyword be redundant.  Writing
to, or reading from the filehandle would invoke the coroutine.

>
>This would necessitate the expansion of select to check for pending 
>events/coroutine writes/data, but that's likely to happen anyway, so...


In my proposed event-based perl runtime, the select loop would be hidden
from the programmer.  All I/O calls would be non-blocking and context switching.

Reply via email to