>>>>> "IS" ==   <[EMAIL PROTECTED]> writes:

  IS> Dan Sugalski <[EMAIL PROTECTED]> writes:

  IS> I have some sympathy with Uri's position here. Signals and event
  IS> loops are close cousins. What I am less clear about is whether we
  IS> want to go down the Tcl route, or do something even more radical
  IS> like making op despatch and the event loop _the same thing_. (If
  IS> we think of perl's ops as the instructions of our virtual machine,
  IS> then this is like what happens when a hardware processor is
  IS> "interrupted".)

that is my concept of inline delivery. in the op dispatch loop, either a
counter is used or a special op (which was automatically code generated
is called and then all pending events (I/O, signals, timers, etc.) get
dispatched synchronously with the perl interpreter. this mode is needed
when you don't use an event loop or you manually call the event
dispatcher in your own code. the count value or how often or where to
insert event check op codes is set with a pragma. this event delivery
method is great for basic programs that want some async behaviour and
are not concerned about the overhead of 'polling' for pending events. at
it guarantees all events are delivered synchronously so you can do any
normal perl operations in any event handler. that is the primary goal
for the entire subsystem, allowing normal perl in signal handlers. :)

the AIO system would support all 3 delivery methods with almost no extra
code required. but it does wrap signals tightly with the event loop and
almost requires the event loop be in the deep core along with the I/O
subsystem. both still should be modular enough that they could be
replaced in a palm port. i think the API i proposed (simple attribute based
objects) would make it easy to modularize the whole thing.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

Reply via email to