diff options
| author | Sergey Shepelev <temotor@gmail.com> | 2013-01-08 05:17:57 +0400 |
|---|---|---|
| committer | Sergey Shepelev <temotor@gmail.com> | 2013-01-08 05:17:57 +0400 |
| commit | d4565ee6a05bc77631ff7ba92288ca4e68cd415a (patch) | |
| tree | ea6802624219a779dcceb056c475e3f228bade2f | |
| parent | 0fae54f8087d511d25e820cfd357193f23a14bd9 (diff) | |
| download | eventlet-d4565ee6a05bc77631ff7ba92288ca4e68cd415a.tar.gz | |
doc: hubs: update link to common.txt (note on internal API functions)
| -rw-r--r-- | eventlet/hubs/__init__.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/eventlet/hubs/__init__.py b/eventlet/hubs/__init__.py index 0f680ce..261831c 100644 --- a/eventlet/hubs/__init__.py +++ b/eventlet/hubs/__init__.py @@ -11,19 +11,19 @@ _threadlocal = threading.local() def get_default_hub(): """Select the default hub implementation based on what multiplexing libraries are installed. The order that the hubs are tried is: - + * twistedr * epoll * poll * select - - It won't automatically select the pyevent hub, because it's not + + It won't automatically select the pyevent hub, because it's not python-thread-safe. - - .. include:: ../../doc/common.txt + + .. include:: ../doc/common.txt .. note :: |internal| - """ - + """ + # pyevent hub disabled for now because it is not thread-safe #try: # import eventlet.hubs.pyevent @@ -46,13 +46,13 @@ def get_default_hub(): def use_hub(mod=None): """Use the module *mod*, containing a class called Hub, as the - event hub. Usually not required; the default hub is usually fine. - + event hub. Usually not required; the default hub is usually fine. + Mod can be an actual module, a string, or None. If *mod* is a module, - it uses it directly. If *mod* is a string, use_hub tries to import - `eventlet.hubs.mod` and use that as the hub module. If *mod* is None, - use_hub uses the default hub. Only call use_hub during application - initialization, because it resets the hub's state and any existing + it uses it directly. If *mod* is a string, use_hub tries to import + `eventlet.hubs.mod` and use that as the hub module. If *mod* is None, + use_hub uses the default hub. Only call use_hub during application + initialization, because it resets the hub's state and any existing timers or listeners will never be resumed. """ if mod is None: @@ -71,7 +71,7 @@ def use_hub(mod=None): def get_hub(): """Get the current event hub singleton object. - + .. note :: |internal| """ try: @@ -85,7 +85,7 @@ def get_hub(): return hub from eventlet import timeout -def trampoline(fd, read=None, write=None, timeout=None, +def trampoline(fd, read=None, write=None, timeout=None, timeout_exc=timeout.Timeout): """Suspend the current coroutine until the given socket object or file descriptor is ready to *read*, ready to *write*, or the specified @@ -98,7 +98,7 @@ def trampoline(fd, read=None, write=None, timeout=None, If the specified *timeout* elapses before the socket is ready to read or write, *timeout_exc* will be raised instead of ``trampoline()`` returning normally. - + .. note :: |internal| """ t = None |
