Minor change to example snippet

This commit is contained in:
nocturn9x committed 2021-12-24 19:09:34 +01:00
1 parent 2c34afe03c
commit cf43bcd579
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ async def main():
# Notice how, until here, the output is in order: this is on purpose!
# When using blocking mode, asyncevents even guarantees that handlers
# with different priorities will be executed in order
print("Firing blocking event 'hello'")
print("Firing non-blocking event 'hi'")
await emit("hi", block=False) # This one spawns hi() and returns immediately
print("Non-blocking event 'hello' fired")
await emit("event3") # Does nothing: No handlers registered for event3!
+1 -1
View File
@@ -21,7 +21,7 @@ async def main():
# Notice how, until here, the output is in order: this is on purpose!
# When using blocking mode, asyncevents even guarantees that handlers
# with different priorities will be executed in order
print("Firing blocking event 'hello'")
print("Firing non-blocking event 'hi'")
await emit("hi", block=False) # This one spawns hi() and returns immediately
print("Non-blocking event 'hello' fired")
await emit("event3") # Does nothing: No handlers registered for event3!