About 1.5-1.7 times slower than sending to a blocking channel.
out := make(chan []byte) // Usually not buffered, with blocking send.
q := chanq.NewQueue(out)
q.Enqueue([]byte(`one`))
q.Enqueue([]byte(`two`))
for {
select {
case data := <-in: // E.g.: forward from in to out without blocking.
q.Enqueue(data)
case q.C <- q.Elem: // Works only when queue is not empty.
q.Dequeue()
}
}