[pypy-issue] [issue920] Lost data with async I/O

Stefano Rivera tracker at bugs.pypy.org
Mon Oct 24 20:49:19 CEST 2011

New submission from Stefano Rivera <pypy at rivera.za.net>:

The attached file, async_sub.py, is a slightly modified for debugging copy, of a 
file of the same name in pygame, which is a descendant of an ActiveState recipe. 
It loses output sometimes, when there are many EAGAINs on reads. This is easy to 
trigger when running a script containing:

for i in `seq 10`; do
	echo "hi"
	sleep 0.002 # tweak this, anywhere up to 0.1

This is due to in-method buffering during loops at many layers of the stream 
stack. The EAGAIN exceptions are unexpected and cause the buffers to be lost.

files: async_sub.py
messages: 3376
nosy: pypy-issue, stefanor
priority: bug
status: unread
title: Lost data with async I/O

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list