We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, NotifyContext returns a context without cancel cause
func NotifyContext(parent context.Context, signals ...os.Signal) (ctx context.Context, stop context.CancelFunc) { ctx, cancel := context.WithCancel(parent) ... }
It is better to return a cause so that we can know it is canceled by a signal Like that:
func NotifyContext(parent context.Context, signals ...os.Signal) (ctx context.Context, stop context.CancelFunc) { ctx, cancel := context.WithCancelCause(parent) ... }
The text was updated successfully, but these errors were encountered:
The cause should be a custom error implementation that gives access to the os.Signal that caused the notification.
error
os.Signal
Sorry, something went wrong.
#60756 ?
Duplicate of #60756
closed due to duplicated
No branches or pull requests
Proposal Details
Currently, NotifyContext returns a context without cancel cause
It is better to return a cause so that we can know it is canceled by a signal
Like that:
The text was updated successfully, but these errors were encountered: