Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is even more funny, because now you need to switch the global reference according to the context. With GIL, it is easy; without it,...




You misunderstand. The "request" or "g" objects in Flask are proxies which access the actual objects through contextvars, which are effectively thread-local storage with some extra sugar. The context stack of a contextvar is already within the TLS and therefore always bound to a specific thread.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: