develooper Front page | perl.perl6.language | Postings from June 2005

Re: Musing on registerable event handlers for some specific events

Thread Previous | Thread Next
Larry Wall
June 8, 2005 12:29
Re: Musing on registerable event handlers for some specific events
Message ID:
On Wed, Jun 08, 2005 at 03:57:14PM +1000, Adam Kennedy wrote:
: What I'd like to see for Perl 6 (and I'm not sure if this exists 
: already), is some sort of minimal event manager.

There will certainly be an event manager for all sorts of events floating
around in Perl 6.  The main trick will be to hide this from the people
who aren't interested.  The other trick will be to actually spec it,
since up till now I've assumed that it should be specced by the people
who are actually into that sort of thing.  Looks like you're one of
them.  :-)

: The number of events I'm talking about would be extremely low, pre and 
: post fork being one. I'm not sure about others, but again I'm imagining 
: only events that matter process-wide.
: I'd like to see the Perl 6 fork() command issue event triggers to some 
: officially blessed event manager module. Any number of other modules 
: could register callbacks for whichever events they liked.

It seems to me that the tricky bit is knowing when everyone has finished
doing everything they want to do before you actually fork.  Just because
you fire off someone's event handler doesn't mean that half the things
they're going to want to do based on that aren't also asynchronous...

: The other alternative is to have the event manager overwrite the core 
: fork() function... and I dislike this sort of hackery as these tricks 
: generally only work if one person does it.

Me too.

: If it can be done in less than 10 lines lines of code, to get the most 
: minimal hooks into the core, I'd like to see it done.

10 lines?  I laugh in your general direction.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About