mirror of
https://github.com/nocturn9x/asyncevents.git
synced 2026-10-05 08:32:32 +02:00
Minor change to example snippet
This commit is contained in:
1 parent
2c34afe03c
commit
cf43bcd579
2 files changed
+2
-2
No files matched your search
@@ -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!
|
||||
|
||||
@@ -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!
|
||||
|
||||
Reference in new issue
Block a user