summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflibustenet <flibustenet@users.noreply.github.com>2014-05-18 11:26:48 +0200
committerflibustenet <flibustenet@users.noreply.github.com>2014-05-18 11:26:48 +0200
commitd194f3df5b5941251a36e0e7d535eaf0d633dd1b (patch)
tree31521a7ce9c36fce91b301ed08b9829da13a1a3c
parentdc9c386fb762defd97313cb6261fcd95f7321e71 (diff)
downloadpyramid-d194f3df5b5941251a36e0e7d535eaf0d633dd1b.tar.gz
pyramid-d194f3df5b5941251a36e0e7d535eaf0d633dd1b.tar.bz2
pyramid-d194f3df5b5941251a36e0e7d535eaf0d633dd1b.zip
Draw attention that tweens instances are unique and shared between threads
Forgetting that tween instance are not instantiated for each request leads to threads issues difficult to detect
-rw-r--r--docs/narr/hooks.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst
index 94be31bbc..91392ce7a 100644
--- a/docs/narr/hooks.rst
+++ b/docs/narr/hooks.rst
@@ -1017,7 +1017,8 @@ You can write the tween factory as a simple closure-returning function:
return simple_tween
Alternatively, the tween factory can be a class with the ``__call__`` magic
-method:
+method (the instance will be unique, be aware that it will be shared
+between threads):
.. code-block:: python
:linenos: