I've now opened https://code.google.com/p/tulip/issues/detail?id=168 so we
have a place to refer to when I have a fix.


On Fri, May 9, 2014 at 3:51 PM, Guido van Rossum <[email protected]> wrote:

> Hi Akira,
>
> Thanks for reporting this. There definitely is a bug in asyncio here -- I
> can repro this exactly!
>
> I haven't found a fix yet, but it seems we're not making progress when the
> protocol is paused.
>
> If I don't get further today I'll file a bug to track this.
>
>
> On Fri, May 9, 2014 at 1:37 PM, Akira Li <[email protected]> wrote:
>
>> Hi,
>>
>> stream.read() blocks forever when reading from a pipe with data that is
>> larger than 2 * limit.
>> stream.read(n) for non-negative n doesn't deadlock in this case.
>>
>> For example, if asyncio.StreamReader(loop=loop) is replaced with
>> asyncio.StreamReader(loop=loop, limit=(len(b'data') // 2 - 1))
>> in examples/subprocess_attach_read_pipe.py then
>> yield from reader.read() never returns.
>>
>>
>> https://code.google.com/p/tulip/source/browse/examples/subprocess_attach_read_pipe.py
>>
>> It is reproducible for larger limit values if the data to be send is
>> larger than 2*limit.
>>
>> I've attached the test file that demonstrates it without an external
>> process.
>>
>> Is it the correct way to connect a read pipe to the event loop?
>>
>> Related discussion:
>>
>> https://code.google.com/p/tulip/source/detail?r=0a716436176993a12cf861b6cafffe8a31bc1127
>>
>
>
>
> --
> --Guido van Rossum (python.org/~guido)
>



-- 
--Guido van Rossum (python.org/~guido)

Reply via email to