Skip to content

Commit e6ed3ff

Browse files
committed
asyncio: Add basic loop.call_soon() test.
1 parent ebc6a1f commit e6ed3ff

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

asyncio/test_call_soon.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import asyncio
2+
import time
3+
4+
5+
def cb():
6+
print("callback")
7+
time.sleep(0.5)
8+
loop.call_soon(cb)
9+
10+
11+
loop = asyncio.get_event_loop()
12+
loop.call_soon(cb)
13+
loop.run_forever()

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