News for hackers. Stuff that matters.
Re:Green threads explained in 200 lines of Rust by swolchok on Wednesday June 12, 2019 @04:58PM (#20169259)
FWIW, there is POSIX-specified functionality (swapcontext and friends) for changing the user thread context: http://pubs.opengroup.org/onlinepubs/009695399/functions/swa...
Re:Green threads explained in 200 lines of Rust by asdfasgasdgasdg on Wednesday June 12, 2019 @10:40PM (#20171415)
It's very slow though, at least if you believe the Boost docs. They have various context-controlling types. One of them is called ucontext_t, and falls back to ucontext. Then there's fcontext_t, which is basically a more advanced version of this article. Boost's docs claim it is much faster than ucontext.