Merge "Add docstring for LoopingCallBase._start()"

This commit is contained in:
Jenkins 2015-10-29 10:06:59 +00:00 committed by Gerrit Code Review
commit ca82d5f64c
1 changed files with 12 additions and 0 deletions

View File

@ -99,6 +99,18 @@ class LoopingCallBase(object):
self._running = False
def _start(self, idle_for, initial_delay=None, stop_on_exception=True):
"""Start the looping
:param idle_for: Callable that takes two positional arguments, returns
how long to idle for. The first positional argument is
the last result from the function being looped and the
second positional argument is the time it took to
calculate that result.
:param initial_delay: How long to delay before starting the looping.
Value is in seconds.
:param stop_on_exception: Whether to stop if an exception occurs.
:returns: eventlet event instance
"""
if self._thread is not None:
raise RuntimeError(self._RUN_ONLY_ONE_MESSAGE)
self._running = True