1 is a sufficient buffer size. Note that there is *exactly one* read from
c.ch in
Therefore, even if the buffer was larger, any extra buffered signals would never be read. So the only possible point to having a larger buffer would be to prevent a writer from blocking on writing to it.
However, as the documentation you are quoting is pointing out, `Notify` (the only writer to that channel) writes the signal non-blockingly. Therefore, there is never any danger of `Notify` getting blocked. The sentence you are quoting (making sure there is enough buffer size) is there to assure you have enough buffer space for a signal to get delivered - not to prevent `Notify` from blocking.
Lastly, even *if* we needed more buffer space, your assumption that we need as much buffer space as there are signals is wrong. A single signal can be caught multiple times. So *if* we needed to be able to handle multiple signals (we don't - again, there is only one read, which is the one cancelling the context), we would also take into account that aspect. And there just is no actually correct size of the buffer, to make sure *all* signals get delivered - the number of signals that can happen before a reader is ready is unbounded.
The code as it is currently is correct.