mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
fix: mutex unlock call in async example
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
//
|
||||
// // In a task:
|
||||
// try mutex.lock(io); // blocks until lock is acquired
|
||||
// defer mutex.unlock();
|
||||
// defer mutex.unlock(io);
|
||||
// // ... critical section: safe to modify shared data ...
|
||||
//
|
||||
// Without the mutex, concurrent tasks could read and write the
|
||||
|
||||
Reference in New Issue
Block a user