Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cond ¶
func (*Cond) Broadcast ¶
func (c *Cond) Broadcast()
Broadcast notifies all goroutines that wait in Cond.
func (*Cond) Wait ¶
Wait like Go standard library's sync.Cond.Wait. have to lock the lock before calling Wait.
Wait will lock the lock and add the current goroutine to the wait list.
When Wait is invoked, the current goroutine will release the lock first and go to the wait list.
( waiting for other goroutines to invoke Signal or Broadcast ).
After being notified, Wait will lock the lock and return. The point of this is that can hold the lock again after the Wait method returns. It is safe to check conditions and process data.
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
Map is generic packing for sync.Map.
func (*Map[K, V]) LoadAndDelete ¶
func (*Map[K, V]) LoadOrStore ¶
Click to show internal directories.
Click to hide internal directories.