[Python-Dev] Adding poll() system call

Jeremy Hylton jeremy@beopen.com
Tue, 11 Jul 2000 13:09:07 -0400 (EDT)


>>>>> "AMK" == Andrew Kuchling <akuchlin@mems-exchange.org> writes:

   AMK> On Tue, Jul 11, 2000 at 11:52:05AM -0400, Jeremy Hylton wrote:
>obj = poll.new() # generate a new pollfd array
>obj.register(f1, POLLIN | POLLOUT)
>obj.register(f2, POLLOUT)
>obj.poll()
>obj.unregister(f2)
>obj.poll()

  AMK> Very interesting, and probably worth doing because all that
  AMK> list parsing *is* a silly waste of CPU.  But could poll still
  AMK> live in the posixmodule, then, or be a module of its own?  [1]

The select module has exactly the same problem and could use the same
interface.  They could both live in their own module.

I'm not sure what to call it.  Possibilities include:

- add it to the current select module
- new name, e.g. asyncio, fileevent
- call it _asyncore and expose it through the asyncore module

Jeremy