2 ms·
I think you're wrong, reasoning in the wrong direction. I think that green threads / fibers / lightweight threads are going to replace threads. Haskell uses the
by tomp 15y ago
I think you're wrong, reasoning in the wrong direction. I think that green threads / fibers / lightweight threads are going to replace threads. Haskell uses them, for example. They are much more lightweight, you can get additional correctness guarantees from them (1: bind the "runner" threads to specific CPUs, you have to worry about memory fences less, 2: if other fibers that use the same resources run on the same "runner" thread, you can "lock" shared data simply by preventing a (lightweight) context switch), the only problem is that they are hard to implement in C(++) (you need stack switching if you want to be reasonably fast), so not many compilers/interpreters implement them.