[Python-Dev] Another 2.4 asyncore headache
Jeremy Hylton
jhylton at gmail.com
Sat Aug 14 19:54:06 CEST 2004
On Sat, 14 Aug 2004 00:37:49 -0400, Tim Peters <tim.peters at gmail.com> wrote:
> More generally, in 2.3.4 it didn't hurt to leave all kinds of crap in
> the socket map, provided that any such crap didn't call itself ready
> to read or ready to write. select() would never see it then. In 2.4,
> select() always sees it. That's a big change, particularly because
> everyone I've seen wrestling with asyncore works via iterative
> poke-and-hope, fiddling their code more-or-less randomly, until
> mysterious errors stop appearing.
>
> So if it's of real value to you (I don't know the motivating use case
> for the change) to pass stuff in the exception set, would it be good
> enough to do
>
> e = r + w
>
> instead of (in effect)
>
> e = map.keys()
>
> ? Then stuff that doesn't call itself readable or writable would
> again, as in 2.3.4, not get passed to select().
I don't understand the use case or the correct intended use of
asyncore <wink>, but
e = r + w
looks appealing. It allows object to be in the socket map without
requiring that they be ready to do some kind of I/O at any instant
that select is called.
Jeremy
More information about the Python-Dev
mailing list