1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

sync: don't force Mutex and Semaphore to be reference (#8331)

This commit is contained in:
Uwe Krüger
2021-01-29 19:52:14 +01:00
committed by GitHub
parent d370e4de9f
commit 4a955d9c54
18 changed files with 541 additions and 296 deletions

View File

@@ -14,7 +14,7 @@ module sync
struct WaitGroup {
mut:
task_count int // current task count
task_count_mutex &Mutex = &Mutex(0) // This mutex protects the task_count count in add()
task_count_mutex &Mutex // This mutex protects the task_count count in add()
wait_blocker &Waiter = &Waiter(0) // This blocks the wait() until released by add()
}