]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Make note on alternative IOLoops more general 1728/head
authorMichael V. DePalatis <mike@depalatis.net>
Sat, 28 May 2016 17:37:48 +0000 (19:37 +0200)
committerMichael V. DePalatis <mike@depalatis.net>
Sat, 28 May 2016 17:37:48 +0000 (19:37 +0200)
tornado/ioloop.py
tornado/platform/asyncio.py
tornado/platform/twisted.py

index 0bcbd776001239189cf44c00d366352905a7aaed..dcb90a16592f1b061888fb8ed66f59c0a3f6ee53 100644 (file)
@@ -172,6 +172,10 @@ class IOLoop(Configurable):
         This is normally not necessary as `instance()` will create
         an `IOLoop` on demand, but you may want to call `install` to use
         a custom subclass of `IOLoop`.
+
+        When using an `IOLoop` subclass, `install` must be called prior
+        to creating any objects that implicitly create their own
+        `IOLoop` (e.g., :class:`tornado.httpclient.AsyncHTTPClient`).
         """
         assert not IOLoop.initialized()
         IOLoop._instance = self
index 9c3b3dfa5bbfd72da23f9649d1a4096cabc73d42..3fd67dbd89cf3713e3b771b4312e616de85f0ef0 100644 (file)
@@ -161,9 +161,8 @@ class AsyncIOMainLoop(BaseAsyncIOLoop):
         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`).
+    See also :meth:`tornado.ioloop.IOLoop.install` for general notes on
+    installing alternative IOLoops.
     """
     def initialize(self, **kwargs):
         super(AsyncIOMainLoop, self).initialize(asyncio.get_event_loop(),
index 91a335832bcc23221e9e0daab27f4cf9deb7da8d..653a79ffc2937b4aba216829a3c427b489a069f1 100644 (file)
@@ -407,6 +407,9 @@ class TwistedIOLoop(tornado.ioloop.IOLoop):
     Not compatible with `tornado.process.Subprocess.set_exit_callback`
     because the ``SIGCHLD`` handlers used by Tornado and Twisted conflict
     with each other.
+
+    See also :meth:`tornado.ioloop.IOLoop.install` for general notes on
+    installing alternative IOLoops.
     """
     def initialize(self, reactor=None, **kwargs):
         super(TwistedIOLoop, self).initialize(**kwargs)