Scipio: A Thread-per-Core Crate for Rust and Linux
I&#x27;ll go against the grain here and say that async&#x2F;await, wether implemented by one thread-per-core like here or by stackless coroutines is not the solution.<p>Async&#x2F;await will make complexity explode because of the colored function problem [1].<p>The solution to expensive context switches is cheap context switches, plain and simple. User-mode lightweight threads like go&#x27;s, or upcoming Java&#x27;s with Loom [2] have proven that this is possible.<p>Yes, it does mean that it can only happen in a language that controls its stack (so that you can slice it off and pop a continuation on it). I sincerely believe this is Rust&#x27;s ballpark; hell they even started the project with that idea in mind.<p>[1] <a href="https:&#x2F;&#x2F;journal.stuffwithstuff.com&#x2F;2015&#x2F;02&#x2F;01&#x2F;what-color-is-your-function&#x2F;" rel="nofollow">https:&#x2F;&#x2F;journal.stuffwithstuff.com&#x2F;2015&#x2F;02&#x2F;01&#x2F;what-color-is-...</a><p>[2] <a href="https:&#x2F;&#x2F;jdk.java.net&#x2F;loom&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jdk.java.net&#x2F;loom&#x2F;</a>