- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for GetNonBlocking (0.54 seconds)
-
internal/once/singleton.go
} // Get will return the singleton value. func (s *Singleton[T]) Get() *T { <-s.set return s.v } // GetNonBlocking will return the singleton value or nil if not set yet. func (s *Singleton[T]) GetNonBlocking() *T { select { case <-s.set: return s.v default: return nil } } // IsSet will return whether the singleton has been set.
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Thu Aug 15 12:04:40 GMT 2024 - 952 bytes - Click Count (0)