Re: Quick question about the event loop



On May 23, 12:47 am, Darren New <d...@xxxxxxxxxx> wrote:
[...] so you don't have to change http or smtp to
make it work the way you want. (From what I can tell, your proposal does
this already, but it's hard to be sure without thinking about it a whole
bunch.)

Yes, this transparency is the exact purpose of my proposal.
The idea is that between a push/pop pair, you have a clear slate,
exactly like on interp init.
All previously registered handlers are "frozen", but reactivated when
you cross the "pop".


Questions are likely to come up with multiple
vwaitadmin push calls, what happens if you do

vwaitadmin push
fileevent ...
vwaitadmin pop
(is the fileevent still around?)

No. The handler state is restored as it was before the push.
(with possible delayed-removal of fileevents whose channels have been
closed between push and pop)

vwaitadmin push
(is the fileevent disabled now?)

Which fileevent ? ;-)
The slate is empty here.

I think the simple answers would work, but again I'd have to think about
it a whole bunch. Possibly adding sufficient introspection to stuff that
this can be done at the command level as a library might be better...

Yes, I had thought about this too. I would also have preferred the
introspection method, because it allows to write much less in C and
much more in Tcl, however it adds a big load of complexity because it
implies to invent a script-level representation for handlers which are
internal (like Windows Event objects or hidden /dev/dsp file
descriptor in Snack, or the equally hidden X11 socket fd); and as
mentioned above, to make it worse, even already scriptable handlers
like [after] are currently not "freezable"...

While a more traditional, monolithic C implementation would simply
juggle the pointers to (a stack of) saved and current list-of-event-
sources (off the top of my hat -- currently I'm ignorant of all the
details)...

-Alex


.



Relevant Pages

  • Re: Isotope decay chains
    ... but what about if that decay chain existed? ... i sayed that Pt cannot become Gold (the real gold only may be ... it is in thise cases of which there is a single alpha particle ... (acording to feuerbachers undestandings ...
    (sci.physics)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: python 3 constant
    ... is require Python to change to accommodate your need. ... Can you see the slight difference? ... Best regards, ...
    (comp.lang.python)
  • Re: The Sci-Fi Rejection Letter That Time Forgot
    ... nations have stockpiled arsenals of these incredible bombs and the time the story is set. ...
    (rec.arts.sf.written)
  • Re: Wachstumssaison Flieder
    ... Handbreit über dem Boden. ... "Fliederkrimi" am Samstag halten heute meine Nerven nicht aus. ... Dorothee ...
    (de.rec.garten)