mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-05-18 06:30:23 -04:00
post done
This commit is contained in:
parent
be98abd3b5
commit
f47aaa5195
3 changed files with 17 additions and 2 deletions
15
Concurrence_examples/asyncio_simple_example.py
Normal file
15
Concurrence_examples/asyncio_simple_example.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import asyncio
|
||||
|
||||
async def delayed_hello():
|
||||
print("Hello ")
|
||||
await asyncio.sleep(1)
|
||||
print("World!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(delayed_hello())
|
||||
loop.close()
|
Loading…
Add table
Add a link
Reference in a new issue