Skip to content

Commit 7b87fbf

Browse files
committed
use sync_perform in the SequenceDispatcher example
1 parent f5e5721 commit 7b87fbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

effect/testing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class SequenceDispatcher(object):
292292
])
293293
294294
with sequence.consume():
295-
perform(sequence, eff)
295+
sync_perform(sequence, eff)
296296
297297
It's important to use `with sequence.consume():` to ensure that all of the
298298
intents are performed. Otherwise, if your code has a bug that causes it to
@@ -301,7 +301,7 @@ class SequenceDispatcher(object):
301301
:obj:`None` is returned if the next intent in the sequence is not equal to
302302
the intent being performed, or if there are no more items left in the
303303
sequence (this is standard behavior for dispatchers that don't handle an
304-
intent).
304+
intent). This lets this dispatcher be composed easily with others.
305305
"""
306306
def __init__(self, sequence):
307307
""":param list sequence: Sequence of (intent, fn)."""

0 commit comments

Comments
 (0)