module Sync

Overview

Synchronization primitives to build concurrent-safe and parallel-safe data structures, sowe can embrace concurrency and parallelismwith more serenity.

Communication through aChannel should be preferredwhenever possible, but sometimeswe need to protect critical sections manually, for example to build higher level constructs, or to protect a mutable global constant:

Defined in:

sync/condition_variable.cr
sync/cv.cr
sync/errors.cr
sync/exclusive.cr
sync/lockable.cr
sync/mu.cr
sync/mutex.cr
sync/rw_lock.cr
sync/shared.cr
sync/sync.cr
sync/type.cr
sync/waiter.cr