Heh cool, found out how to pin threads to cores
Linux: https://docs.rs/nix/0.11.0/nix/sched/fn.sched_setaffinity.html …
Windows: https://docs.rs/kernel32-sys/0.2.2/x86_64-pc-windows-gnu/kernel32/fn.SetThreadAffinityMask.html …
Source thread:https://users.rust-lang.org/t/how-does-rust-ensure-threads-run-on-different-cores-idle-cores-etc/10724 …
-
Show this thread
-
I was reading about thread schedulers over the weekend, and was wondering how you could prevent contention between event loop schedulers (e.g. Tokio) and the OS thread scheduler. The answer is to spawn 1 thread per core, and ask the OS to keep it there. Contention solved
.1 reply 0 retweets 1 likeShow this thread -
Replying to @yoshuawuyts
The number of cores can change dynamically though (i.e. big.LITTLE). Is that an issue?
1 reply 0 retweets 1 like
Replying to @sebdeckers
Oh what, never heard of this. Idk if that's an issue haha.
1:03 AM - 13 Aug 2018
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.