News for hackers. Stuff that matters.
Re:Comparison of Rust async and Linux thread context switch ... by IshKebab on Friday February 12, 2021 @01:55PM (#26117100)
Sure, threads are easy to understand. The difficult is when you get a concurrency bug but that can happen with single threaded async/await code anyway.

Also threads are definitely not easy to use in all languages. E.g. C++ gives you very little help (no channels for example), and JavaScript makes starting threads difficult and moving/sharing memory is limited to primitive arrays.

Re:Comparison of Rust async and Linux thread context switch ... by IgorPartola on Friday February 12, 2021 @10:11PM (#26121060)
A queue implementation in C is easy to create and understand if you don’t have a library for it handy. Combined with a mutex and/or a spin lock and once you’ve grokked pthreads’ mental model you should have the primitives. But those are all guns that shoot both ways if you aren’t careful.