From: Michael V. DePalatis Date: Wed, 25 May 2016 17:56:34 +0000 (+0200) Subject: Add hint about installing AsyncIOMainLoop early X-Git-Tag: v4.4.0b1~10^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93ddccca2ac1b9233948c215ba206a6f9c31ebf4;p=thirdparty%2Ftornado.git Add hint about installing AsyncIOMainLoop early --- diff --git a/tornado/platform/asyncio.py b/tornado/platform/asyncio.py index 6b374f29e..9c3b3dfa5 100644 --- a/tornado/platform/asyncio.py +++ b/tornado/platform/asyncio.py @@ -160,6 +160,10 @@ class AsyncIOMainLoop(BaseAsyncIOLoop): import asyncio AsyncIOMainLoop().install() asyncio.get_event_loop().run_forever() + + Note that the ``AsyncIOMainLoop`` must be installed prior to + creating any objects that implicitly create their own ``IOLoop`` + (e.g., :class:`tornado.httpclient.AsyncHTTPClient`). """ def initialize(self, **kwargs): super(AsyncIOMainLoop, self).initialize(asyncio.get_event_loop(),