-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util/admission: use ctx.Err() for fast-path cancellation check
`Context.Err` is cheaper than calling `Context.Done` and then polling on the returned channel. `Context.Done` lazily allocates a channel and then writes to an atomic variable. The channel read then incurs a mutex lock. Release justification: None. Wait for v22.2.
- Loading branch information
1 parent
2b2c438
commit 091221e
Showing
1 changed file
with
14 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters