Skip to content
  • Paul Sokolovsky's avatar
    stream: Add compliant handling of non-blocking read()/write(). · a592104a
    Paul Sokolovsky authored
    In case of empty non-blocking read()/write(), both return None. read()
    cannot return 0, as that means EOF, so returns another value, and then
    write() just follows. This is still pretty unexpected, and typical
    "if not len:" check would treat this as EOF. Well, non-blocking files
    require special handling!
    
    This also kind of makes it depending on POSIX, but well, anything else
    should emulate POSIX anyway ;-).
    a592104a