mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-09 00:09:59 +00:00
Merge pull request 'fix: mutex unlock call in async example' (#407) from gabelluardo/ziglings:fix-async91 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/407
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