34 ms·
> I don't agree with OP about I/O-bound ops, I think if you're looking to green threading, you've taken a wrong It depends in the implementation. In Go for exa
by arghwhat 2y ago
> I don't agree with OP about I/O-bound ops, I think if you're looking to green threading, you've taken a wrong
It depends in the implementation. In Go for example, all I/O is async and suspend your green thread, replacing it with another runnable green thread.
This works the same as if you managed an event loop on your own for the purpose of I/O, which is the best way to handle I/O outside for regular user space code. It’s just automatic with your code resembling a simple, blocking scenario.
OPs note on threading would be C# or runtime specific - green threads have no problem with parallelism, with runtimes commonly having a thread per core (or more) and having them all run green threads in parallel.