]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add hint about installing AsyncIOMainLoop early
authorMichael V. DePalatis <mike@depalatis.net>
Wed, 25 May 2016 17:56:34 +0000 (19:56 +0200)
committerMichael V. DePalatis <mike@depalatis.net>
Wed, 25 May 2016 17:56:34 +0000 (19:56 +0200)
tornado/platform/asyncio.py

index 6b374f29e35ac3fa43f05cd11c3c9c09b521b787..9c3b3dfa5bbfd72da23f9649d1a4096cabc73d42 100644 (file)
@@ -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(),