I am a green hand in c++ and boost::thread. I have the following question.
Any comment is appreciated:)
Simply put, I want to manipulate a file with two threads:
one for read and one for write. When the total access number exceeds a given
limit, they just return. End of thread and main.
So in theory,read/write should be in equal probability. But I found
their behaviors tend to cluster. So the question is that: is my
observation wrong? or My understanding about mutex etc is wrong?
or anything els