Search found 2 matches
- Mon Jun 28, 2021 9:52 pm
- Forum: ESP8266 boards
- Topic: Someone with a GitHub account: Please add -fm dout to the docs
- Replies: 5
- Views: 2522
- Mon Jun 28, 2021 10:17 am
- Forum: General Discussion and Questions
- Topic: uasyncio behaves differently than regular Python asyncio: task just keeps running
- Replies: 3
- Views: 1643
uasyncio behaves differently than regular Python asyncio: task just keeps running
This is my example: try: import uasyncio as asyncio except ImportError: import asyncio async def count(): i = 0 while True: print(i) i += 1 await asyncio.sleep(1) async def main(): asyncio.create_task(count()) await asyncio.sleep(5) asyncio.run(main()) asyncio.run(main()) In regular Python, I get: 0...