3 ms·
I read those and just now read: http://ddili.org/ders/d.en/fibers.html http://ddili.org/ders/d.en/fibers.html. The main difference, at least from my limited vi
by vips7L 5y ago
I read those and just now read: http://ddili.org/ders/d.en/fibers.html http://ddili.org/ders/d.en/fibers.html.
The main difference, at least from my limited view, is that D fibers have to explicitly yield and as far as I know in project loom they've built this yielding into the JVM when I/O occurs. It looks like libraries have to intercept libc calls in D to achieve the same thing [0].
I also see that D provides a fiber scheduler, but it only schedules on a single thread vs loom's virtualThreadExecutor which will use multiple threads.
[0] https://github.com/DmitryOlshansky/photon#solution https://github.com/DmitryOlshansky/photon#solution