Just implement generics already. Sheesh. https://github.com/google/gvisor/blob/master/tools/go_generics/generics.go …
-
-
Replying to @pcwalton
"Just implement concurrency already" Or maybe "just implement a fast compiler already".
2 replies 1 retweet 2 likes -
I look forward to Rust implementing async/await. Though despite you framing it as a "best of both worlds" situation, I forsee lots of thread pool exhaustion due to synchronous mutexes, priority inversion, etc. We have been here before (me in 3 different languages).
2 replies 0 retweets 1 like -
Replying to @sjy
Yeah, there should probably be something to prevent holding MutexGuard over yield points. Could be a lint. cc
@aaron_turon — maybe you’ve already thought of a solution here.2 replies 0 retweets 0 likes -
I should also mention that the starvation issue has been discussed a lot, and years ago there was a rough consensus to spin up more threads to prevent starvation. Not sure if that has changed. BTW, Go has the same issue with cgo threads and uses this technique.
1 reply 0 retweets 0 likes -
Replying to @pcwalton @aaron_turon
That kind of lint would be defeated by any abstraction boundary that has a mutex internally. Unless you track "could block" at the type-system level. Also, there are lots of things that block thread pools, mutexes are just one example.
2 replies 0 retweets 0 likes -
Go certainly has issues with its FFI (performance being another). But seems like a difference of magnitude; percentage of CGo-using Go programs is probably under 15%. Percentage of programs that ever make use of both blocking APIs and some sort of IO is closer to 100%.
1 reply 0 retweets 0 likes
Yeah, the lint probably isn’t worth it. It’s better to just spawn more threads to avoid starvation, which is a robust solution that avoids deadlock (which is why cgo does it). We tried Go-like userspace threading, and it was totally not worth the drawbacks for Rust’s domain.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.