|
@@ -49,6 +49,14 @@ func toContext(ctx context.Context, v *Instance) context.Context {
|
|
|
Internal API
|
|
Internal API
|
|
|
*/
|
|
*/
|
|
|
func ToBackgroundDetachedContext(ctx context.Context) context.Context {
|
|
func ToBackgroundDetachedContext(ctx context.Context) context.Context {
|
|
|
- instance := MustFromContext(ctx)
|
|
|
|
|
- return toContext(context.Background(), instance)
|
|
|
|
|
|
|
+ return &temporaryValueDelegationFix{context.Background(), ctx}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+type temporaryValueDelegationFix struct {
|
|
|
|
|
+ context.Context
|
|
|
|
|
+ value context.Context
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+func (t *temporaryValueDelegationFix) Value(key interface{}) interface{} {
|
|
|
|
|
+ return t.value.Value(key)
|
|
|
}
|
|
}
|