Closed killmenot closed 7 years ago
Interesting find. Actually I've kind of abandoned the customQueue mechanism anyway. But yes, you're right - that logic could be reduced to what you're suggesting :-)
@robtweed can I remove customQueue
from the module?
Unfortunately not - it's been a possible option in the code and some people might be using it. Best to leave alone, but if any code optimisation is possible, then OK
Hi @robtweed
Have a question regarding the following snippet of the code: https://github.com/robtweed/ewd-qoper8/blob/master/lib/master/proto/startWorker.js#L84-L95
I think once we enter in the condition
!customQueue && finished
that means thatcustomQueue
isfalse
.This means that
if (customQueue || q.queue.length > 0) {
can be simplified toif ( q.queue.length > 0) {
WDYT about this snippet?