Remix.run Logo
LelouBil 3 hours ago

Can you explain more ? I always heard this.

Hendrikto 2 hours ago | parent [-]

The most promiment example is probably Go with its goroutines, but there are so many more. You can easily spawn tens of thousands of goroutines, with low overhead and great performance.

vlovich123 13 minutes ago | parent | next [-]

I thought it was obvious from context: OS threads are too heavyweight for fine grained concurrency

Go uses userspace threads. It’s also interesting that Go and Java are the only mainstream languages to have gone this route. The reason is that it has a huge penalty when calling FFI of code that doesn’t use green threads whereas this cost isn’t there for async/await.

igregoryca 2 hours ago | parent | prev [-]

Goroutines/"fibers"/"green threads" are usually scheduled by the runtime system across a small pool of actual OS threads.