Open
Description
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.
fn main(){
for i in 0..{
std::thread::spawn(move || {
dbg!(i);
loop{
std::thread::yield_now();
}
});
// std::thread::yield_now();
}
}
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
Metadata
Assignees
Labels
No labels