NOTE
2.3 sync
The sync package provides primitives such as locks, condition variables, Once, and WaitGroup. These notes organize their roles in concurrent programs.
This is a historical learning note and may contain outdated or incomplete understanding.
1. What It Is
Provides basic synchronization primitives.
Except for Once and WaitGroup, most are intended for low-level libraries.
high-level synchronization generally uses channels.
2. What It Contains
2.1. Locker
- An interface
- Has
LockandUnlockmethods
2.2. Mutex
2.3. RWMutex
2.4. Cond
2.5. Once
2.6. Map
2.7. Pool
2.8. WaitGroup
2.9. atomic Package
3. References
Drag to pan, scroll to zoom, and click a node to expand or collapse it. Large maps start with deeper levels collapsed; click nodes to expand them.
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub