mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 05:24:48 -04:00
refactor(tracker): rename trySend to TrySend to make it public
This commit is contained in:
parent
0199658025
commit
9f89c37956
@ -85,10 +85,10 @@ func (b *Broker) PutAudioBuffer(buf *sointu.AudioBuffer) {
|
||||
b.bufferPool.Put(buf)
|
||||
}
|
||||
|
||||
// trySend is a helper function to send a value to a channel if it is not full.
|
||||
// TrySend is a helper function to send a value to a channel if it is not full.
|
||||
// It is guaranteed to be non-blocking. Return true if the value was sent, false
|
||||
// otherwise.
|
||||
func trySend[T any](c chan<- T, v T) bool {
|
||||
func TrySend[T any](c chan<- T, v T) bool {
|
||||
select {
|
||||
case c <- v:
|
||||
default:
|
||||
|
Reference in New Issue
Block a user