Click here to Skip to main content
15,896,118 members

Comments by Member 14969632 (Top 1 by date)

Member 14969632 11-Sep-22 6:07am View    
Thanks Rick. My code has exception thrown read access violation after producer thread printed Running task... about 4100 times. Currently, I can see messages printed in consumer thread pop() , then producer printed.

task 0 has acquired the lock
task 0 is releasing
Running task 0
...


The program exited with code 0 (0x0) and showed: "Exception thrown at 0x00406CE5 in Project1.exe: 0xC0000005: Access violation reading location 0xDDDDDDDD."

Besides, how about the way to write testing code for thread safety checking and other issues in threads?