Yury Selivanov <yseliva...@gmail.com> added the comment:

> Just try the snippet :-) If you want to see it finish in a finite time, move 
> the future instantiation inside the coroutine.

Yeah, I see the problem.  OTOH your proposed change to lazily attach a loop to 
the future isn't fully backwards compatible.  It would be a nightmare to find a 
bug in a large codebase caused by this change in Future behaviour.  So I'm -1 
on this idea, that ship has sailed.

> Unfortunately that's not possible in our case.  Short version: we are using 
> Tornado which creates a asyncio Future eagerly, see 
> https://github.com/tornadoweb/tornado/blob/master/tornado/locks.py#L199

Maybe the solution is to fix Tornado?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31960>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to