Reading a bit about Go's goroutine scheduler. Sounds like it tries to solve many of the same problems a GPU's shader core does. # threads ("goroutines") >> # of simds ("OS threads"), fast switching, small stacks, minimal fairness, turn blocking calls into async calls.
-
-
M:N threading is still useful for CPU-bound task-parallel kernels. For that we have Rayon/GCD/etc, on in opt-in basis. Note that these frameworks are stackless (so OS library incompatibility isn’t a problem) and don’t try to multiplex I/O.
-
Async/await is likewise stackless and avoids the OS library incompatibility problem. If you want M:N, I think a better solution is reviving something like Paul Turner’s switchto patch or Windows fibers. http://pdxplumbers.osuosl.org/2013/ocw//system/presentations/1653/original/LPC%20-%20User%20Threading.pdf …
- 5 more replies
New conversation -
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.