mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: fix a shared
test
This commit is contained in:
@ -7,8 +7,8 @@ fn my_thread_with_params(s string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn my_fn_calling_threads() {
|
fn my_fn_calling_threads() {
|
||||||
spawn my_thread()
|
go my_thread()
|
||||||
spawn my_thread_with_params('yay')
|
go my_thread_with_params('yay')
|
||||||
|
|
||||||
spawn my_thread_with_params('nono')
|
go my_thread_with_params('nono')
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ a: 5
|
|||||||
a: read_threads
|
a: read_threads
|
||||||
}
|
}
|
||||||
for _ in 0.. read_threads {
|
for _ in 0.. read_threads {
|
||||||
go x.f(shared z)
|
spawn x.f(shared z)
|
||||||
}
|
}
|
||||||
for i in 0..writes {
|
for i in 0..writes {
|
||||||
lock x { // wait for ongoing reads to finish, don't start new ones
|
lock x { // wait for ongoing reads to finish, don't start new ones
|
||||||
|
Reference in New Issue
Block a user