+ 1
Python: Tasks vs Threading (asyncio)
Hi, I have read that the async and await keywords in collaboration with the asyncio module are not used to create a separate thread from the main one, but to create one or more tasks that can run simultaneously. What I don't understand is how does it do this if it doesn't use separate threads? Would anyone know how to answer?
1 Odpowiedź
+ 4
High level languages sometimes implement custom threadlikes in userspace. For example NodeJS has a built-in ticking engine that schedules which command will be executed next, like a fake CPU.