by kccqzy · 7y ago · 0 comments
For what it's worth, I translated the whole code into C++. And it's essentially the same: https://gist.github.com/kccqzy/c404b8614f39f854f137dcc9284b0... And it runs correctly on macOS and Linux when compiled with clang.
I tried installing Rust and building the example, but then it complained about nightly features, and I didn't have time to figure that out.
C/C++ are mainstream languages, and building is as simple as g++ test.cpp.
So in this case, it's just `rustc +nightly green_threads.rs`