> On Jun 11, 2015, at 2:05 AM, Martin Teichmann <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> StreamWriter.drain cannot be called from different tasks (asyncio tasks that 
> is)
> at the same time. It raises an assertion error. I added a script that shows 
> this problem.

In my opinion, this is fine.  It should probably be some exception other than 
AssertionError, but it should be an exception.  Do not try to manipulate a 
StreamWriter or a StreamReader from multiple tasks at once.  If you encourage 
people to do this, it is a recipe for corrupted output streams and interleaved 
writes.

-glyph

Reply via email to