You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If coro1 is executed before coro2, after the await it'll see modifications done by coro2 as they share the same thread. In the same way, a call to get_default_locale() after an await might return a different locale if another coroutine has changed it in the meantime. It's better to have users rely only on request.locale or you need to implement something like thread locals but for tasks.
The text was updated successfully, but these errors were encountered:
Using thread locals for coroutines is not what you want
If coro1 is executed before coro2, after the await it'll see modifications done by coro2 as they share the same thread. In the same way, a call to get_default_locale() after an await might return a different locale if another coroutine has changed it in the meantime. It's better to have users rely only on request.locale or you need to implement something like thread locals but for tasks.
The text was updated successfully, but these errors were encountered: