PThread RWLock Deadlocking with Recursive Locks
问题 I've been working on a small sand-boxed example to help me figure out how to use rwlocks. Everything seems fairly straightforward, however I'm getting deadlocks in my example every once and a while and don't understand why it's happening. I've put the code example on pastebin because it's more than a few lines of code: http://pastebin.org/359203 If you run the example. When it eventually deadlocks the last three print statements will be one of two cases: one: th4: request lock th3: request