LinkedListQueue.root_values

Should the values in queue be added to GC as roots, thus preventing the GC from collecting these values.

Since the items in the queue are allocated by the Malloc allocation manager, they are not scanned by the GC. This means that whatever the items reference - the values, are not considered as being referenced by anything (unless the values are referenced by some other "GC scanned" object). This will result in GC collecting these values, which will have very bad ramifications as we're still referencing them in the queue.

So we add the values to GC as roots, thus preventing the GC from collecting them, depending on the value of 'root_values'

class LinkedListQueue(T, alias gc_tracking_policy = GCTrackingPolicy.refTypesOnly)
protected static
bool root_values;

Meta