Skip to content

Glossary: Kotlin Beyond the Basics

Mutex

Also written: withLock

A lock letting one coroutine at a time run a block. `withLock { }` waits its turn, suspending rather than blocking.

Where the book teaches it

Related terms

race conditionshared mutable state