On Thursday, 17 April 2014 at 18:18:49 UTC, Ola Fosheim Grøstad
wrote:
On Thursday, 17 April 2014 at 18:00:25 UTC, Dicebot wrote:
Such weak @nogc could help to avoid triggering allocations by
an accident and encourage usage of output ranges / buffers.
Ok, more like a "lintish" feature of the "remind me if I use
too much of feature X in these sections" variety.
I view @nogc as a safeguard against crashes when I let threads
run while the garbage collector is in a collection phase. A
means to bypass "stop-the-world" collection by having pure
@nogc threads.
Yeah for me @nogc is more of a lint thing in general. But it
can't be done by lint because @nogc needs to affect mangling to
work with separate compilation reliably.
I think for your scenario having dedicated @nogc threads makes
more sense, this can be built on top of plain function attribute
@nogc.