Agree with @KlausD. But here is what I can say best based on my experience,
The issue might be because of,
1 - Queue synchronization and task completion handling
2 -Thread coordination and termination
3- Queue data flow between threads