diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference.rst | 5 | ||||
-rw-r--r-- | docs/timing.rst | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/reference.rst b/docs/reference.rst index 09a390e..d2c0aa6 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -183,6 +183,11 @@ call. See also the :ref:`chapter on timing <timing-chapter>`. this percentage of the time. The statsd server does *not* take the sample rate into account for timers. +.. warning: + Decorators are not thread-safe and may cause errors when decorated + functions are called concurrently. Use context managers or raw timers + instead. + .. _timer-start: diff --git a/docs/timing.rst b/docs/timing.rst index 8608db0..d077aa4 100644 --- a/docs/timing.rst +++ b/docs/timing.rst @@ -70,6 +70,11 @@ be sent to the statsd server. myfunc(1, 2) myfunc(3, 7) +.. warning: + Decorators are not thread-safe and may cause errors when decorated + functions are called concurrently. Use context managers or raw timers + instead. + Using a Timer object directly ============================= |