14 Oct
2012
14 Oct
'12
5:29 a.m.
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