If you try new free threaded python on multiple cpu cores for something like this:
def compute:
while True: pass
[threading.Thread(target=compute).start() for _ in range(10)]
You will be happy to notice all your CPU cores being utilized, however here:
async def compute_async():
while True: pass
await asyncio.gather(*[compute_async() for _ in range(10)])
You will be stuck with one core at a time, unless you do something like asyncio.to_thread
. Would it not be great, if awaiting coroutine also just utilizes the freedom of free threaded CPython?