doc.odin 700 B

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