Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: state more explicitly the behavior for buffered channels in …
…the fast path under extreme conditions. This information can be useful when implement something like this: write side: eventCh := make(chan struct{}, 1) // buffer size of exactly 1 // something happened before (X) // notify via chan select { case eventCh <- struct{}{}: default: } read side: for { select { case <-eventCh: // new event comes, handle it } } This doc makes it explicit that right after `<-eventCh`, the `selectnbsend` in the write side is guaranteed to succeed.
- Loading branch information