mirror of
https://git.aramjonghu.dev/AramJonghu/ziglings.git
synced 2026-09-01 08:03:29 +02: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