Open uptickmetachu opened 2 months ago
@uptickmetachu I don't have active django projects with async, so don't have the immediate need for it
If you could adjust the tests and add async testcases to it (tests/testapp/tests.py
, based on TestUserBase
, TestSetUserToThread
, CurrentUserFieldOnUpdateTestCase
just create the async variant), I could take a look
Also, in non-django contexts I recall we used contextvars, which would have the benefit of having a single implementation that works both with sync and async setups. What do you think?
With django being used in more async contexts should the threading local
_thread_locals
swap to usingasgiref.local.Local
?