-
Notifications
You must be signed in to change notification settings - Fork 90
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
Multithreading is broken #650
Comments
This is a side effect of Hermit having a cooperative scheduler and We could, of course, make @m-mueller678, did you experience issues with this behavior in real applications, or only with these synthetic examples? Spawning an infinite number of threads without yielding implicitly in one form or another seems quite exotic to me. |
I ran into this with tokio. I am looking at it right now, and it seems the issue is Do you think one of these would be more appropriate? |
I want to port the redox parking lot implementation. Ideally, I want to use The alternative is to get the current time via |
yet another option would be to have variations of |
When running this program with 2 CPUs, only the main thread and one additional thread get to run. Uncommenting the yield on the main thread fixes it. I would expect that all threads get to run, since all threads but the main thread continuously yield.
qemu:
qemu-system-x86_64 -cpu host -enable-kvm -display none -smp 2 -m 8G -serial stdio -kernel ~/Downloads/hermit-loader-x86_64 -initrd target/x86_64-unknown-hermit/debug/hermit-rs-template
The text was updated successfully, but these errors were encountered: