Re:A Foray for Fun into Windows Fibers
by vips7L on Friday June 18, 2021 @12:04PM
(#27551779)
Are there any good examples of D fibers? Reading the documentation they don't seem as usable as Java's looming virtual threads.
[ Parent
| on HN ]
Re:A Foray for Fun into Windows Fibers
by MaxBarraclough on Friday June 18, 2021 @03:12PM
(#27553795)
The vibe.d web server framework uses D's fibers. [0]
I imagine you've already seen [1] and the two other articles it links to.
I read those and just now read: 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.