You absolutely must use my globalVarMap()
or system.util.getGlobals()
to coordinate access to a single ConcurrentLinkedQueue, with careful application of .setdefault
to not smash a prior instance.
Also, keep in mind that ConcurrentLinkedQueue
is unbounded--if you screw up the draining, you will leak gobs of memory. Consider using LinkedBlockingQueue
with a capped size.