How does one best write tests for a multi-threaded producer-consumer C program?I know GDB can be used to debug threads, but I believe GDB also stops the thread currently being debugged while other threads continue running.I want to test proper mutex lucking/unlocking and blocking by my threads. I've looked around a lot but haven't been able to find any good resources. I have unit tests for all the non-concurrent functionality, but want to make sure my concurrency is correct. How can tests for multithreaded programs best be achieved?
How can I best test a multithreaded C producer-consumer program?
c;testing;multithreading