News for hackers. Stuff that matters.
Re:How I went about learning Rust by BreakfastB0b on Friday July 15, 2022 @03:38AM (#32105707)
Minor nitpick but goroutines are absolutely not preemptable, they’re cooperative. The go compiler regularly sticks in yield statements around IO, and certain function calls, but you absolutely can starve the runtime by running a number of goroutines equal to the number of cores doing heavy computation, just like Node.JS’s event loop.
Re:How I went about learning Rust by foldr on Friday July 15, 2022 @03:50AM (#32105788)
This changed in Go 1.14 on most platforms: https://go.dev/doc/go1.14#runtime
Re:How I went about learning Rust by BreakfastB0b on Friday July 15, 2022 @05:45AM (#32106407)
TIL