79460850

Date: 2025-02-23 07:43:48
Score: 1.5
Natty:
Report link

Thanks to commenters and answer posts. I solved my problem using mutexes and condition variables. Just wanted to mention that this and similar questions are quiet common and may be searched by prompts like "Multithreaded queue", "Queue synchronization", "Thread-safe queue" and "Producer Consumer problem".

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): to comment
  • Whitelisted phrase (-2): I solved
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
Posted by: qloq