New submission from Tony <tony.solomo...@gmail.com>:
There is a cache variable for the running loop holder, but once set_running_loop is called the variable was set to NULL so the next time get_running_loop would have to query a dictionary to receive the running loop holder. I thought why not always cache the latest set_running_loop? The only issue I thought of here is in the details of the implementation: I have too little experience in python to know if there could be a context switch to get_running_loop while set_running_loop is running. If a context switch is possible there then this issue would be way harder to solve, but it is still solvable. ---------- messages: 373333 nosy: tontinton priority: normal severity: normal status: open title: asyncio module better caching for set and get_running_loop _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41247> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com