diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-11-17 14:22:03 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-11-17 14:22:03 -0500 |
commit | fbcafdcc1b68885ac2c43172ba30ad17f396b197 (patch) | |
tree | 3f760f731f5ba966a5b04404b945ec27f6378b7a | |
parent | e3f1bcfdc9ec1ab9acf09e3cfa366a44033da5e4 (diff) | |
download | dogpile-core-fbcafdcc1b68885ac2c43172ba30ad17f396b197.tar.gz |
put init params in class docs
-rw-r--r-- | docs/build/conf.py | 4 | ||||
-rw-r--r-- | dogpile/dogpile.py | 14 | ||||
-rw-r--r-- | dogpile/nameregistry.py | 9 |
3 files changed, 13 insertions, 14 deletions
diff --git a/docs/build/conf.py b/docs/build/conf.py index f29093f..94015f1 100644 --- a/docs/build/conf.py +++ b/docs/build/conf.py @@ -22,7 +22,6 @@ import sys, os # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. sys.path.insert(0, os.path.abspath('../../')) -sys.path.insert(0, os.path.abspath('.')) import dogpile @@ -30,7 +29,7 @@ import dogpile # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'builder'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -95,7 +94,6 @@ pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] -autodoc_default_flags = 'special-members' # -- Options for HTML output --------------------------------------------------- diff --git a/dogpile/dogpile.py b/dogpile/dogpile.py index f6b1d11..165d47b 100644 --- a/dogpile/dogpile.py +++ b/dogpile/dogpile.py @@ -21,17 +21,17 @@ class Dogpile(object): thread/process to be elected as the creator of a new value, while other threads/processes continue to return the previous version of that value. - + + :param expiretime: Expiration time in seconds. + :param init: if True, set the 'createdtime' to the + current time. + :param lock: a mutex object that provides + ``acquire()`` and ``release()`` methods. + """ def __init__(self, expiretime, init=False, lock=None): """Construct a new :class:`.Dogpile`. - :param expiretime: Expiration time in seconds. - :param init: if True, set the 'createdtime' to the - current time. - :param lock: a mutex object that provides - ``acquire()`` and ``release()`` methods. - """ if lock: self.dogpilelock = lock diff --git a/dogpile/nameregistry.py b/dogpile/nameregistry.py index 159526e..ab3ad7b 100644 --- a/dogpile/nameregistry.py +++ b/dogpile/nameregistry.py @@ -39,7 +39,11 @@ class NameRegistry(object): all threads requesting a certain key use the same :class:`.Dogpile` object, without the need to maintain each :class:`.Dogpile` object persistently in memory. - + + :param creator: A function that will create a new + value, given the identifier passed to the :meth:`.NameRegistry.get` + method. + """ _locks = weakref.WeakValueDictionary() _mutex = threading.RLock() @@ -47,9 +51,6 @@ class NameRegistry(object): def __init__(self, creator): """Create a new :class:`.NameRegistry`. - :param creator: A function that will create a new - value, given the identifier passed to the :meth:`.NameRegistry.get` - method. """ self._values = weakref.WeakValueDictionary() |