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
In Go 1.21, the context package got the context.WithoutCancel function, which creates a new context with all the same values as an existing context, but with an independent lifetime. This solves the same problem that I tried to solve with ContextDeriver.
It's easy enough to change the implementation of DefaultContextDeriver to use context.WithoutCancel and deprecate the other functionality, but I'd really like to remove this whole API. Internally, we don't use this at all and I couldn't find any public uses with Sourcegraph, so I think the impact would be minor. It should also be possible to move any custom functionality either into the handler or to a wrapper around the event dispatcher.
The text was updated successfully, but these errors were encountered:
In Go 1.21, the
context
package got thecontext.WithoutCancel
function, which creates a new context with all the same values as an existing context, but with an independent lifetime. This solves the same problem that I tried to solve withContextDeriver
.It's easy enough to change the implementation of
DefaultContextDeriver
to usecontext.WithoutCancel
and deprecate the other functionality, but I'd really like to remove this whole API. Internally, we don't use this at all and I couldn't find any public uses with Sourcegraph, so I think the impact would be minor. It should also be possible to move any custom functionality either into the handler or to a wrapper around the event dispatcher.The text was updated successfully, but these errors were encountered: