On Saturday, 28 November 2015 at 11:35:56 UTC, Guillaume Piolat
On Saturday, 28 November 2015 at 02:37:40 UTC, Marco Leise
We can probably agree that we don't know about the impact on a
large multimedia application written in D. What you can
communicate is: Create a @nogc thread routine and don't
register it with the GC to write real-time VSTs.
Guillaume did a good job, taking the GC out of the real-time
thread. It's D, it is a bit of a hack, it's the correct way to
do it and works. But I don't see it debunking any myths about
GC and real time...
A) It doesn't mix them to begin with.
B) "Realtime GCs" are a thing. D's GC is not optimized for
such a use case.
C) With a small heap it doesn't matter. (We need more complex
But the claim we hear on Internet forums is:
- "can't do realtime with a GC language" (wat)
- "GC leads to GC pauses" (only if you let them happen)
Which is imho a shortcut.
Just to play devils advocate... you haven't proved GC can do real
time if you achieve it by quarantining the real time code from
It's kind of like saying you can climb a mountain on a bycicle if
you get of an carry it on the bits that are too steep.
That said, the basic idea is that you shouldn't do anything that
might take too long or use any mutex / locks. That is the same
whether you use C++, Pascal, or D.
The real story is how easy D makes it to achieve that.