Are mutexes really fool-proof?

Started by
20 comments, last by OpOpOpOp 10 years, 2 months ago
can't type anything ;-;

press ctrl-c to send interrupt signal, that will interrupt your program and let you look around. Then you will get a prompt "(gdb)", and you can type in "thread <thread number>" to look at different threads. When you are ready to continue the program, type in "c".

Advertisement

I finally solved this problem. Well, more like worked around it. I made both threads communicate through a socket instead of a shared array. At first I thought this would waste memory but then I realized that thread A doesn't really need to access the array, it simply adds data to the end of it.

Thanks everybody who helped! :D

This topic is closed to new replies.

Advertisement