bbgo: add NewContextWithDefaultIsolation

This commit is contained in:
c9s 2022-10-03 18:39:39 +08:00
parent 198683d141
commit 60956e0157
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -28,3 +28,7 @@ func NewIsolationFromContext(ctx context.Context) *Isolation {
func NewContextWithIsolation(parent context.Context, isolation *Isolation) context.Context {
return context.WithValue(parent, IsolationContextKey, isolation)
}
func NewContextWithDefaultIsolation(parent context.Context) context.Context {
return context.WithValue(parent, IsolationContextKey, defaultIsolation)
}