News for hackers. Stuff that matters.
Re:Async-await on stable Rust by jchw on Thursday November 07, 2019 @11:52PM (#21480046)
Go is even more different. Rust async has explicit yields with await, but Go does it implicitly at various key locations. This is actually pretty surprising to many folks, it was in the past and maybe still is possible to deadlock Go with a certain incantation of tight looping.

Another difference with Rust is that async functions are stackless. Go has to contend with having a non-conventional stack and interoperability with C code (and sometimes syscalls, vDSO, etc.) that expects a relatively large stack requires pivoting.

I do wish Rust could solve this problem, but the two approaches are very different indeed. I think it’s a fact of life that accidental blocking will exist in Rust, approaches that prevent it are complicated and indeed have runtime costs.

Re:Async-await on stable Rust by systemcluster on Friday November 08, 2019 @01:42AM (#21480398)
> [...] Go does it implicitly at various key locations. This is actually pretty surprising to many folks, it was in the past and maybe still is possible to deadlock Go with a certain incantation of tight looping.

This is being worked on here: https://github.com/golang/go/issues/24543

Re:Async-await on stable Rust by tomp on Friday November 08, 2019 @04:29AM (#21480930)
Is there any documentation on the latest status on this, how far along they've come and what technical solutions they're considering / have settled on?
Re:Async-await on stable Rust by jchw on Friday November 08, 2019 @12:30PM (#21484527)
The proposal is marked accepted, and commits are being made to reference it, so I suppose the design doc and that issue are most likely the source of truth.
Re:Async-await on stable Rust by jchw on Friday November 08, 2019 @02:58AM (#21480621)
Fascinating. This would make Goroutines one giant leap closer to being thread-like. It feels weird how much of the OS scheduler is being “duplicated” but you can’t really argue much with the results.