[Python-ideas] re-implementing Twisted for fun and profit

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Oct 14 07:29:05 CEST 2012


Guido van Rossum wrote:
> I thought that 
> edge-triggered meant "call this callback once, when this specific event 
> happens" (e.g. a specific async read or write call completing) whereas 
> level-triggered referred to "call this callback whenever a certain 
> condition is true" (e.g. a socket is ready for reading or writing).

Not sure if this is relevant, but I'd just like to point out
that the behaviour of select() in this respect is actually
*edge triggered* by this definition. Once it has reported that
a given file descriptor is ready, it *won't* report that file
descriptor again until you do something with it. This can be
a subtle source of bugs in select-based code if you're not
aware of it.

-- 
Greg



More information about the Python-ideas mailing list