doc.odin 635 B

1234567891011121314151617
  1. /*
  2. Various synchronization primitives useful to mediate threads' access to shared memory.
  3. To limit or control the threads' access to shared memory typically the following approaches are used:
  4. - Locks
  5. - Lock-free
  6. When using locks, sections of the code that access shared memory (also known as
  7. **critical sections**) are guarded by locks, allowing limited access to threads
  8. and blocking the execution of any other threads.
  9. In lock-free programming the data itself is organized in such a way that threads
  10. don't intervene much. It can be done via segmenting the data between threads,
  11. and/or by using atomic operations.
  12. */
  13. package sync