Hi!
I’m digging in the Request.get_current()
method that returns the current Request instance, using ContextVars.
So far, so good. But from my own understanding, when the request has ended, it should remove itself from the ContextVar, by calling cls._current.reset(token)
.
Except, it’s not the case at Sanic. I haven’t found where the reset()
is called.
Why is that? Is it done automatically when the request is - somehow - deleted upon completion ?
Thank you for that clarification!