feat: add copy to task manager
This commit is contained in:
12
pkg/utils/ctx.go
Normal file
12
pkg/utils/ctx.go
Normal file
@ -0,0 +1,12 @@
|
||||
package utils
|
||||
|
||||
import "context"
|
||||
|
||||
func IsCanceled(ctx context.Context) bool {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user