Green Threads Explained in 200 Lines of Rust
Green threads, userland threads, goroutines or fibers, they have many names but for simplicity’s sake I’ll refer to them all as green threads from now on.
In this article we explore how they work by implementing a very simple example where we create our own green threads in 200 lines of Rust code. We’ll be explaining everything along the way so our main focus here is to understand them and learn how they work by using simple, but working example. It’s fine if you are curios and don’t know Rust, it’s just 200 lines anyway.
Appears in lists (1)
More like this (2)
Insights on Rust vs Go — John is a huge Go fan and has done a...Insights on Rust vs Go — John is a huge Go fan and has done a lot of work in the Go space, but he thinks both Rust and Go are awesome and takes a careful look at where Go and Rust each independently make the most sense. We wouldn't usually strongly feature a 'versus' type post, but several people from the Go and...
Comparing Go and Rust for Writing a CLI Tool — A developer, unfamiliar with both Go...Comparing Go and Rust for Writing a CLI Tool — A developer, unfamiliar with both Go and Rust, decided to write an app in both and compared his experiences. It’s not deep but it’s quite balanced and he found good reasons to use both languages.