diff options
| author | Joe Heck <heckj@mac.com> | 2012-11-11 21:00:42 +0000 |
|---|---|---|
| committer | Joe Heck <heckj@mac.com> | 2012-11-18 18:19:50 -0800 |
| commit | b6d24bbad9493b4318367c23cbab8c4f688a924a (patch) | |
| tree | 12b9a67982eef705d29433a7dbb0b1e8a931bbd0 /openstack/common/threadgroup.py | |
| parent | 8aca5eb5868b5ead362777abb093f11c6d8b1817 (diff) | |
| download | oslo-b6d24bbad9493b4318367c23cbab8c4f688a924a.tar.gz oslo-b6d24bbad9493b4318367c23cbab8c4f688a924a.tar.xz oslo-b6d24bbad9493b4318367c23cbab8c4f688a924a.zip | |
updating sphinx documentation
* adding openstack theming (copied from keystone project theme)
* updating .gitignore to ignore generated API docs
* updated formatting in index.rst page
* updaed openstack/common/processutils.py to match hacking docstring
* updated docstrings to resolve sphinx warnings
Change-Id: Ie89afe20eeab1efd2daf440fc65ccdf90f723c51
Diffstat (limited to 'openstack/common/threadgroup.py')
| -rw-r--r-- | openstack/common/threadgroup.py | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/openstack/common/threadgroup.py b/openstack/common/threadgroup.py index f6fe50e..27b3c4c 100644 --- a/openstack/common/threadgroup.py +++ b/openstack/common/threadgroup.py @@ -27,19 +27,17 @@ LOG = logging.getLogger(__name__) def _thread_done(gt, *args, **kwargs): - ''' - Callback function to be passed to GreenThread.link() when we spawn() - Calls the ThreadGroup to notify if. - ''' + """ Callback function to be passed to GreenThread.link() when we spawn() + Calls the :class:`ThreadGroup` to notify if. + + """ kwargs['group'].thread_done(kwargs['thread']) class Thread(object): - """ - Wrapper around a greenthread, that holds a reference to - the ThreadGroup. The Thread will notify the ThreadGroup - when it has done so it can be removed from the threads - list. + """ Wrapper around a greenthread, that holds a reference to the + :class:`ThreadGroup`. The Thread will notify the :class:`ThreadGroup` when + it has done so it can be removed from the threads list. """ def __init__(self, name, thread, group): self.name = name @@ -54,11 +52,11 @@ class Thread(object): class ThreadGroup(object): - """ - The point of this class is to: - - keep track of timers and greenthreads (making it easier to stop them + """ The point of the ThreadGroup classis to: + + * keep track of timers and greenthreads (making it easier to stop them when need be). - - provide an easy API to add timers. + * provide an easy API to add timers. """ def __init__(self, name, thread_pool_size=10): self.name = name |
