On Thu, Dec 21, 2017 at 05:32:58AM +0800, Paul Goyette wrote: > again (no work can be enqueued if already in the queue). But I don't > see how "remember the last work enqueued and wait for it to be done > before destroying" is more versatile than "waiting for all to be done > before destroying". It certainly seems that the latter is a simpler > approach.
The function is more versatile as it allows other uses than preparing the queue destruction. It would be much easier, if the work item had a state field.... -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."