bitcoin/bitcoin — pull request #1052 by sipa (2012-04-06 21:39:45+00:00)
Title: Use scoped locks instead of CRITICAL_BLOCK

Remove CRITICAL_BLOCK and TRY_CRITICAL_BLOCK, and replace them with LOCK, TRY_LOCK and IS_LOCKED. These are macros that define a local CCriticalBlock variable (a boost::interprocess::scoped_lock wrapper), which is much more C++ than the if and/or for constructions in macros.

I've intentionally not touched formattng/indentation where possible, in order not to break other patches. There are several cases where simplications are possible now, though.