mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools: make v test-cleancode test everything by default (#10050)
This commit is contained in:
@@ -15,13 +15,13 @@ fn C.atomic_fetch_add_u32(voidptr, u32) u32
|
||||
// `wg.wait()` to wait for all jobs to have finished
|
||||
//
|
||||
// in each parallel job:
|
||||
// `wg.done()` when finished
|
||||
// `wg.done()` when finished
|
||||
//
|
||||
// [init_with=new_waitgroup] // TODO: implement support for init_with struct attribute, and disallow WaitGroup{} from outside the sync.new_waitgroup() function.
|
||||
[heap]
|
||||
struct WaitGroup {
|
||||
mut:
|
||||
task_count u32 // current task count - reading/writing should be atomic
|
||||
task_count u32 // current task count - reading/writing should be atomic
|
||||
sem Semaphore // This blocks wait() until tast_countreleased by add()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user