|
From: Julian S. <js...@ac...> - 2007-11-12 10:26:24
|
> I notice that I am getting race reports for situations where I > am rather sure that the only active thread is the main thread. It depends what you mean by the "only active thread". Are the other threads still alive but blocked somehow? Or (as below) have they really all exited? > My programs do not apply locks in these sections of the code, > for example during server shutdown after all threads were > join'ed. If all threads merge into one using pthread_join, then you are allowed to access it without a lock. The exact rule (which is somewhat more general than the sentence above implies) is described in detail in the docs, which are unfortunately hard to build. Try this: $ (cd docs && make html-docs) $ konqueror docs/html/hg-manual.html Click on "6.4.4. Restoration of Exclusive Ownership" J |