summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorAmos Latteier <amos@latteier.com>2013-08-12 16:45:11 -0400
committerAmos Latteier <amos@latteier.com>2013-08-12 16:45:11 -0400
commit29ab2b964164844daa012c3e80d276f49ccbe217 (patch)
tree6c66f71ae7e59b309a48f1a0acdb85de55c6134d /docs/narr
parent387051c91d5a3844db5fa0938a19c19f5881e056 (diff)
downloadpyramid-29ab2b964164844daa012c3e80d276f49ccbe217.tar.gz
pyramid-29ab2b964164844daa012c3e80d276f49ccbe217.tar.bz2
pyramid-29ab2b964164844daa012c3e80d276f49ccbe217.zip
Minor fixes suggested by @tshepang and @mmerickel thanks!
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/events.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/narr/events.rst b/docs/narr/events.rst
index 702618843..485247afc 100644
--- a/docs/narr/events.rst
+++ b/docs/narr/events.rst
@@ -77,7 +77,7 @@ type via the :func:`pyramid.events.subscriber` function.
@subscriber(NewRequest)
def mysubscriber(event):
- event.request.foo = 1
+ event.request.foo = 1
When the :func:`~pyramid.events.subscriber` decorator is used a
:term:`scan` must be performed against the package containing the
@@ -189,7 +189,7 @@ example custom event classes:
Some Pyramid applications choose to define custom events classes in an
``events`` module.
-You can subscribe to custom events in the same way what you subscribe
+You can subscribe to custom events in the same way that you subscribe
to Pyramid events -- either imperatively or with a decorator. Here's
an example of subscribing to a custom event with a decorator:
@@ -225,3 +225,7 @@ accessed as ``request.registry.notify``. For example:
This example view will notify all subscribers to the custom
``DocCreated`` event.
+
+Note that when you fire an event, all subscribers are run
+synchronously on the current thread. So it's generally not a good idea
+to create event handlers that may take a long time to run.