mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
This is a breaking change. Before, usage looked like this: ```zig const held = mutex.acquire(); defer held.release(); ``` Now it looks like this: ```zig mutex.lock(); defer mutex.unlock(); ``` The `Held` type was an idea to make mutexes slightly safer by making it more difficult to forget to release an aquired lock. However, this ultimately caused more problems than it solved, when any data structures needed to store a held mutex. Simplify everything by reducing the API down to the primitives: lock() and unlock(). Closes #8051 Closes #8246 Closes #10105 |
||
|---|---|---|
| .. | ||
| AutoResetEvent.zig | ||
| Condition.zig | ||
| Futex.zig | ||
| Mutex.zig | ||
| ResetEvent.zig | ||
| RwLock.zig | ||
| Semaphore.zig | ||
| StaticResetEvent.zig | ||