This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients abo, ajaksu2, brian.curtin, giampaolo.rodola, pitrou, tim.golden, vstinner
Date 2010-10-27.12:19:49
SpamBayes Score 5.4858895e-11
Marked as misclassified No
Message-id <1288181993.51.0.863020712391.issue949667@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2010-10-27 12:19:53vstinnersetrecipients: + vstinner, abo, pitrou, giampaolo.rodola, ajaksu2, tim.golden, brian.curtin
2010-10-27 12:19:53vstinnersetmessageid: <1288181993.51.0.863020712391.issue949667@psf.upfronthosting.co.za>
2010-10-27 12:19:52vstinnerlinkissue949667 messages
2010-10-27 12:19:51vstinnercreate