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
3 files changed