I think this might have been my own bad code… looking into it it looks like my pool job can sometimes add another job to the pool. (So removeAllJobs could leave one dangling as the lock gets released and the job added)…
Seems like the old code wasn’t as sensitive as this.
I’m going to try and refactor a little… sorry for the noise
Yea, definitely my problem. Note to anyone who finds this…if you start asserting in killing threads and looking at your other threads and the thread that’s been killed is waiting on a lock, chances are you added a job after remove jobs did its thing(which from what I can tell would only happen if you were stupid enough(talking about myself so I can be harsh) to add jobs from the worker anyway!