Skip to content

Commit 4b244d6

Browse files
committed
core/async: rmv redundant timer in favour of ctx
1 parent 70f7d1f commit 4b244d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intra/core/async.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func Grx[T any](who string, f WorkCtx[T], d time.Duration) (zz T, completed bool
8686
select {
8787
case out := <-ch:
8888
return out, true
89-
case <-time.After(d):
89+
case <-ctx.Done(): // timeout
9090
}
9191
return zz, false
9292
}

0 commit comments

Comments
 (0)