in reply to Thread communication
Is there a way i can let the the compBoss know the contents in the globalQ. The globalQ is being enqueued by the queryWorkers
I don't think that's the problem here.
The problem is that compBoss is filling the globalQ with enough undef entries to kill off the compworker before the queryworkers have had time to process all the queries and queue their results on globalQ.
It looks like race that the queryworkers are unlikely to win.
Since whatever the compworker does seems to follow on from what the queryworker does, I'm not sure why you need those pieces of work in separate threads ? It would certainly simplify things if they weren't.
|
|---|