[sync]: Document all procedures

This commit is contained in:
flysand7
2024-07-30 19:13:35 +11:00
parent cb31df34c1
commit 3aac4b1a3e
4 changed files with 1262 additions and 170 deletions
+21
View File
@@ -0,0 +1,21 @@
/*
Synchronization primitives
This package implements various synchronization primitives that can be used to
synchronize threads' access to shared memory.
To limit or control the threads' access to shared memory typically the
following approaches are used:
* Locks
* Lock-free
When using locks, sections of the code that access shared memory (also known as
**critical sections**) are guarded by locks, allowing limited access to threads
and blocking the execution of any other threads.
In lock-free programming the data itself is organized in such a way that threads
don't intervene much. It can be done via segmenting the data between threads,
and/or by using atomic operations.
*/
package sync