Based on CPython.
I'm new to python asyncio (and also similar nodejs, etc).
I've heard that the python asyncio is not based on thread, thus leaving it free of thread-related problems such as two write operations at the same time. As I know the GIL provides 'some kind of' thread-safety based on bytecode in CPython ie, each bytecode is atomic. Now my question. At what atomic unit does the python asyncio provides the atomic execution of a python script?
For example, one feasible(not that I'm saying it is reasonable) answer is that each line in python script is atomic. I think I can use this to handle the race condition of concurrent async corutines.
Thanks for your help, please tell me if I miss something.
I took a look at python docs. no luck.