asyncore module

Skip Montanaro skip at pobox.com
Fri Mar 14 12:13:43 EST 2003


    Ryan> Is asyncore ideal for programs with user input as well as sockets?

Generally, no.  At the bottom of asyncore.py you will find this comment
right before the definitions of the file_wrapper and file_dispatcher
classes:

    # Asynchronous File I/O:
    #
    # After a little research (reading man pages on various unixen, and
    # digging through the linux kernel), I've determined that select()
    # isn't meant for doing doing asynchronous file i/o.
    # Heartening, though - reading linux/mm/filemap.c shows that linux
    # supports asynchronous read-ahead.  So _MOST_ of the time, the data
    # will be sitting in memory for us already when we go to read it.
    #
    # What other OS's (besides NT) support async file i/o?  [VMS?]
    #
    # Regardless, this is useful for pipes, and stdin/stdout...

Skip





More information about the Python-list mailing list