-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
sync.waitgroup behaves differently from Golang #6870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I tried it. walking './vlib' is works. But walking '/home/zakuro/src' is hungup. In golang, Works both. I think, This problem occurs when target files too many. |
update: V 0.2.2 c057b45, timestamp: 2021-02-15 18:56:26 +0200 still got this problme |
@zakuro9715 for me it worked |
V 0.2.4 ccf6285 still got this with another error
|
Interesting error. I just tried your code on Manjaro Linux, with latest There were a few odd messages, but those are mostly because there are still 'panic's in vlib where there should be optionals. I don't think your latest error is a V problem. |
Works ok now. |
@medvednikov Hi. I have retry it and it seems doesn't works for now
$ v run test.v
...
...
...
after: 227
after: 224
before: 244
after: 231
before: 228
after: 227
before: 232
before: 255
after: 254
after: 253
before: 254
before: 255
after: 254
after: 253
V panic: `go main__walk()`: Resource temporarily unavailable
v hash: 436b19c
0 test 0x000000010ddf83ed panic_error_number + 77
1 test 0x000000010de2ea68 main__walk + 1192
2 test 0x000000010dde32b1 main__walk_thread_wrapper + 49
3 test 0x000000010de3d8ac GC_start_routine + 100
4 libsystem_pthread.dylib 0x00007ff805d9e4e1 _pthread_start + 125
5 libsystem_pthread.dylib 0x00007ff805d99f6b thread_start + 15
before: 254
after: 253
before: 254
after: 253
V panic: `go main__walk()`: Resource temporarily unavailable
v hash: 436b19c
0 test 0x000000010ddf83ed panic_error_number + 77
1 test 0x000000010de2ea68 main__walk + 1192
2 test 0x000000010dde32b1 main__walk_thread_wrapper + 49 |
V version:
V 0.1.29 ed874ff
OS:
macos 11.0.1
What did you do?
I wrote a function to traverse directories using goroutine
What did you expect to see?
The proceeding should exit,
wg.Wait()
should execute like expect.What did you see instead?
At least I didn't see anything wrong from the above code.
Normally, the process will exit normally.
But in reality, the process will hang.
wg.wait()
will never executeFor comparison, I wrote an equivalent Golang code
and Golang's code works fine for me.
The text was updated successfully, but these errors were encountered: