Skip to content

Commit 524ccae

Browse files
committed
Tutorial: correct errors in WaitAll and WaitAny examples.
1 parent 893a374 commit 524ccae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

v3/docs/TUTORIAL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ from primitives import WaitAny
715715
evt1 = Event()
716716
evt2 = Event()
717717
# Launch tasks that might trigger these events
718-
evt = await WaitAny((evt1, evt2))
718+
evt = await WaitAny((evt1, evt2)).wait()
719719
# One or other was triggered
720720
if evt is evt1:
721721
evt1.clear()
@@ -730,7 +730,7 @@ until all passed `Event`s have been set:
730730
from primitives import WaitAll
731731
evt1 = Event()
732732
evt2 = Event()
733-
wa = WaitAll((evt1, evt2)) #
733+
wa = WaitAll((evt1, evt2)).wait()
734734
# Launch tasks that might trigger these events
735735
await wa
736736
# Both were triggered

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy