Message119704
Prototype to test nonblocking file objet:
- add getblocking() and setblocking() methods to _io._FileIO and all _pyio classes
- fileio_setblocking() is implemented using fcntl(fd, F_SETFL, flags | O_NONBLOCK) (POSIX only?)
- BufferedReader.read() uses read1() if the file is blocking
Use test_process.py to test it: this script runs a Python interpreter in a subprocess. It uses select() to check if there is data or not. Eg. type '1+1\n' and then 'exit()\n'. Set PYIO_HAVE_BLOCKING constant to False (in test_process.py) to test the script without io_blocking.patch.
I'm not sure that select() is required, but it doesn't work without it (read() blocks). |
|
Date |
User |
Action |
Args |
2010-10-27 12:19:53 | vstinner | set | recipients:
+ vstinner, abo, pitrou, giampaolo.rodola, ajaksu2, tim.golden, brian.curtin |
2010-10-27 12:19:53 | vstinner | set | messageid: <1288181993.51.0.863020712391.issue949667@psf.upfronthosting.co.za> |
2010-10-27 12:19:52 | vstinner | link | issue949667 messages |
2010-10-27 12:19:51 | vstinner | create | |
|