summaryrefslogtreecommitdiff
path: root/doc/modules
diff options
context:
space:
mode:
authorRyan Williams <rdw@lindenlab.com>2010-02-19 00:49:14 -0800
committerRyan Williams <rdw@lindenlab.com>2010-02-19 00:49:14 -0800
commitf40449af12296cc96d410283260b2de5cb7d0c32 (patch)
treea571c6267a73e246adf7562fe0e22657b117933c /doc/modules
parent3f7bb316ea08f0eafaeff1dc2f3531555ae60c7f (diff)
downloadeventlet-f40449af12296cc96d410283260b2de5cb7d0c32.tar.gz
Minor doc improvements. Added more backdoor documentation.
Diffstat (limited to 'doc/modules')
-rw-r--r--doc/modules/backdoor.rst21
-rw-r--r--doc/modules/greenpool.rst1
2 files changed, 22 insertions, 0 deletions
diff --git a/doc/modules/backdoor.rst b/doc/modules/backdoor.rst
index 6dd4dcb..79b2fdf 100644
--- a/doc/modules/backdoor.rst
+++ b/doc/modules/backdoor.rst
@@ -1,6 +1,27 @@
:mod:`backdoor` -- Python interactive interpreter within a running process
===============================================================================
+The backdoor module is convenient for inspecting the state of a long-running process. It supplies the normal Python interactive interpreter in a way that does not block the normal operation of the application. This can be useful for debugging, performance tuning, or simply learning about how things behave in situ.
+
+In the application, spawn a greenthread running backdoor_server on a listening socket::
+
+ eventlet.spawn(backdoor.backdoor_server, eventlet.listen(('localhost', 3000)))
+
+When this is running, the backdoor is accessible via telnet to the specified port.
+
+.. code-block:: sh
+
+ $ telnet localhost 3000
+ Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39)
+ [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> import myapp
+ >>> dir(myapp)
+ ['__all__', '__doc__', '__name__', 'myfunc']
+ >>>
+
+The backdoor cooperatively yields to the rest of the application between commands, so on a running server continuously serving requests, you can observe the internal state changing between interpreter commands.
+
.. automodule:: eventlet.backdoor
:members:
diff --git a/doc/modules/greenpool.rst b/doc/modules/greenpool.rst
index 9f79d88..0bf031f 100644
--- a/doc/modules/greenpool.rst
+++ b/doc/modules/greenpool.rst
@@ -3,3 +3,4 @@
.. automodule:: eventlet.greenpool
:members:
+