I suggest that
scoped_lock::release be either renamed or be hidden from easy
use. I
spent about 45 minutes tracking down a bug in my code where I used
scoped_lock::release instead of scoped_lock::unlock.
The mistake was due
to my experience with other libraries. For example, java's concurrency library uses
release() instead of unlock(). Win32 API is called ReleaseMutex. More generally,
the terminology acquire/release is often used with synchronization constructs.
The current
semantics of scoped_lock::release() are consistent with auto_ptr and other C++
idioms. But I think they may still suprise users.
-Costa