Go Package sync

From NovaOrdis Knowledge Base
Revision as of 23:18, 15 January 2024 by Ovidiu (talk | contribs) (→‎Overview)
Jump to navigation Jump to search

External

Internal

Overview

The sync package provides synchronization primitives to use when synchronization between goroutines is necessary.

However, other than the Once and WaitGroup types, most sync primitives are intended for use by low-level library routines. Higher level synchronization is better done via channels and communication.

Memory Access Synchronization Primitives

Thread Synchronization Primitives

WaitGroup

WaitGroup

Mutex

Mutex

RWMutex

RWMutex

Once

Once

Cond

Cond