BIND 10 trac2225_statistics, updated. be258adbecd48f1d46e47566f54843db1b579b9c [2225_statistics] Change description of multi-threaded use
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jan 11 14:54:43 UTC 2013
The branch, trac2225_statistics has been updated
via be258adbecd48f1d46e47566f54843db1b579b9c (commit)
via 02a31879b8d8db032883d6e28d57c2369f2299cf (commit)
via df03141495a568971ff26d78a229beaa5b373e19 (commit)
from cd917b3660e1d944d749fb2fb19ce9dfb622c39c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit be258adbecd48f1d46e47566f54843db1b579b9c
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Jan 11 20:22:40 2013 +0530
[2225_statistics] Change description of multi-threaded use
commit 02a31879b8d8db032883d6e28d57c2369f2299cf
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Jan 11 20:18:16 2013 +0530
[2225_statistics] Remove unnecessary documentation
commit df03141495a568971ff26d78a229beaa5b373e19
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Jan 11 20:17:27 2013 +0530
[2225_statistics] Minor grammar correction
-----------------------------------------------------------------------
Summary of changes:
src/lib/python/isc/statistics/counters.py | 39 +++++++++++------------------
1 file changed, 15 insertions(+), 24 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/statistics/counters.py b/src/lib/python/isc/statistics/counters.py
index 6eb3dc9..d824bda 100644
--- a/src/lib/python/isc/statistics/counters.py
+++ b/src/lib/python/isc/statistics/counters.py
@@ -290,11 +290,9 @@ class Counters():
def _incdec(self, *args, step=1):
"""A common helper function for incrementing or decrementing a
- counter. It locks the thread because it is considered to be
- invoked by a multi-threading
- caller. isc.cc.data.DataNotFoundError is raised when
- incrementing the counter of the item undefined in the spec
- file."""
+ counter. It acquires a lock to support multi-threaded
+ use. isc.cc.data.DataNotFoundError is raised when incrementing
+ the counter of the item undefined in the spec file."""
identifier = _concat(*args)
with self._rlock:
if self._disabled: return
@@ -303,21 +301,15 @@ class Counters():
identifier, step)
def inc(self, *args):
- """A incrementer for a counter. Locks the thread because it is
- considered to be invoked by a multi-threading
- caller. isc.cc.data.DataNotFoundError is raised when
- incrementing the counter of the item undefined in the spec
- file. It calls internally a common helper function
- _incdec()"""
+ """An incrementer for a counter. It acquires a lock to support
+ multi-threaded use. isc.cc.data.DataNotFoundError is raised when
+ incrementing the counter of the item undefined in the spec file."""
return self._incdec(*args)
def dec(self, *args):
- """A decrementer for a counter. Locks the thread because it is
- considered to be invoked by a multi-threading
- caller. isc.cc.data.DataNotFoundError is raised when
- decrementing the counter of the item undefined in the spec
- file. It calls internally a common helper function
- _incdec()"""
+ """A decrementer for a counter. It acquires a lock to support
+ multi-threaded use. isc.cc.data.DataNotFoundError is raised when
+ decrementing the counter of the item undefined in the spec file."""
return self._incdec(*args, step=-1)
def get(self, *args):
@@ -329,19 +321,18 @@ class Counters():
def start_timer(self, *args):
"""Starts a timer which is identified by args and keeps it
- running until stop_timer() is called. It's also considered to
- be called from multi-threads."""
+ running until stop_timer() is called. It acquires a lock to
+ support multi-threaded use."""
identifier = _concat(*args)
with self._rlock:
if self._disabled: return
isc.cc.data.set(self._start_time, identifier, _start_timer())
def stop_timer(self, *args):
- """Stops a timer which is identified by args. It's also
- considered to be called from multi-threads. If the timer
- isn't started by start_timer() yet, it raises no
- exception. However if args aren't defined in the spec file, it
- raises DataNotFoundError.
+ """Stops a timer which is identified by args. It acquires a lock
+ to support multi-threaded use. If the timer isn't started by
+ start_timer() yet, it raises no exception. However if args
+ aren't defined in the spec file, it raises DataNotFoundError.
"""
identifier = _concat(*args)
with self._rlock:
More information about the bind10-changes
mailing list