ACE library
best implementation of thread locking i've ever seen. Overall brilliant and helpful library. Only falldown is severe lack of documentation. (for those of you who don't like hunting through header files, and even then they're minimalistic comments).