mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 04:57:17 +00:00
17 lines
176 B
Go
17 lines
176 B
Go
|
package common
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
)
|
||
|
|
||
|
func IsCanceled(ctx context.Context) bool {
|
||
|
select {
|
||
|
case <-ctx.Done():
|
||
|
return true
|
||
|
default:
|
||
|
// nothing to do
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|