Skip to content

fix: misuse unbuffered channel on os signal - #260

Open
myselfBZ wants to merge 1 commit into
HDT3213:masterfrom
myselfBZ:master
Open

fix: misuse unbuffered channel on os signal#260
myselfBZ wants to merge 1 commit into
HDT3213:masterfrom
myselfBZ:master

Conversation

@myselfBZ

Copy link
Copy Markdown

signal.Notify() requires a buffered channel for signals. Explicitly stated in the documentation

Package signal will not block sending to c: the caller must ensure that c has sufficient buffer space to keep up with the expected signal rate. For a channel used for notification of just one signal value, a buffer of size 1 is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant