mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 18:58:51 +00:00
3a3b53bc6e
Throw TimedOutException on wait timeout so caller can distinguish between timeout and event. Modified facebook::thrift::concurrency::PthreadThread.start: Throw SystemrResourceException on any pthread_* function call failure rather than asserting 0. Added facebook::thrift::concurrency::Thread.id() and facebook::thrift::concurrency::ThreadFactory.currentThreadId(): Return thread-id of thread and current thread respectively. Needed for reentrancy tests in ThreadManager Added facebook::thrift::concurrency::ThreadManager.pendingTaskCountMaxN Modified facebook::thrift::concurrency::ThreadManager.add(): Now support a maximum pending task count and block if the current pending task count is max. If timeout is specified for add, TimedOutException is thrown if pending task count doesn't decrease in the timeout interval. If add() is called by a ThreadManager worker thread and the task cannot be added, a TooManyPendingTasksException is thrown rather than blocking, since deadlocks can ensue if worker threads block waiting for works threads to complete tasks. Reviewed By: mcslee, aditya Revert Plan: revertible Test Plan: concurrency/test/ThreadManagerTests.h run concurrency-test thread-manager git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665120 13f79535-47bb-0310-9956-ffa450edef68 |
||
---|---|---|
.. | ||
aclocal | ||
src | ||
bootstrap.sh | ||
cleanup.sh | ||
configure.ac | ||
COPYING | ||
LICENSE | ||
Makefile.am | ||
README |
Thrift C++ Software Library README Author: Mark Slee (mcslee@facebook.com) Last Modified: 2007-Mar-05 Thrift is distributed under the Thrift open source software license. Please see the included LICENSE file. Using Thrift with C++ ===================== The Thrift C++ libraries are built using the GNU tools. Follow the instructions in the top-level README, or run bootstrap.sh in this folder to generate the Makefiles. In case you do not want to open another README file, do this: ./bootstrap.sh ./configure (--with-boost=/usr/local) make sudo make install Thrift is divided into two libraries. libthrift The core Thrift library contains all the core Thrift code. It requires boost shared pointers, pthreads, and librt. libthriftnb This library contains the Thrift nonblocking server, which uses libevent. To link this library you will also need to link libevent. Linking Against Thrift ====================== After you build and install Thrift the libraries are installed to /usr/local/lib by default. Make sure this is in your LDPATH. On Linux, the best way to do this is to ensure that /usr/local/lib is in your /etc/ld.so.conf and then run /sbin/ldconfig. Depending upon whether you are linking dynamically or statically and how your build environment it set up, you may need to include additional libraries when linking against thrift, such as librt and/or libpthread. If you are using libthriftnb you will also need libevent. Dependencies ============ boost shared pointers http://www.boost.org/libs/smart_ptr/smart_ptr.htm libevent (for libthriftnb only) http://monkey.org/~provos/libevent/