cpp: non-blocking add for ThreadManager
authorDavid Reiss <dreiss@apache.org>
Tue, 9 Mar 2010 05:19:59 +0000 (05:19 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 9 Mar 2010 05:19:59 +0000 (05:19 +0000)
commit4e19f1914e49db4b7913ff0f5af8eec51caee875
tree64db18658f59cb9411dc32d8c9a764131e8c82f8
parent6c1ee214c447bef02c3aa091ff5706503d1b1004
cpp: non-blocking add for ThreadManager

It's rare for the ThreadManager mutex to be contended, but it is
possible.  For nonblocking applications, it is necessary to have a
strict timeout for the lock acquisition.  With this change, that timeout
is enforced.  Also add timeout parameters to Mutex::lock and
Guard::Guard to support this feature.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920679 13f79535-47bb-0310-9956-ffa450edef68
lib/cpp/src/concurrency/Mutex.cpp
lib/cpp/src/concurrency/Mutex.h
lib/cpp/src/concurrency/ThreadManager.cpp