[Python-Dev] Asynchronous context manager in a typical network server

Andrew Barnert abarnert at yahoo.com
Fri Dec 18 15:45:47 EST 2015


On Dec 18, 2015, at 10:36, Guido van Rossum <guido at python.org> wrote:
> 
>> On Fri, Dec 18, 2015 at 10:25 AM, Szieberth Ádám <sziebadam at gmail.com> wrote:
>> Thanks for your reply Guido!
>> 
>> > - In theory, instead of waiting for a Future that is cancelled by a
>> > handler, you should be able to use asyncio.sleep() with a very large number
>> > (e.g. a million seconds).
>> 
>> I was thinking on this too but it seemed less explicit to me than awaiting a
>> pure Future with a short comment. Moreover, even millions of seconds can pass.
> 
> 11 years.

It's 11 days. Which is pretty reasonable server uptime. And probably just outside the longest test you're ever going to run. I don't trust myself to pick "a big number" when the numbers get this big. But I still sometimes sneak one past myself somehow. Hence my suggestion for a way to actually say "forever".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20151218/c7beb687/attachment.html>


More information about the Python-Dev mailing list