/[Apache-SVN]
ViewVC logotype

Revision 665120


Jump to revision: Previous Next
Author: marc
Date: Tue May 22 23:59:54 2007 UTC (17 years, 5 months ago)
Changed paths: 15
Log Message:
Modified facebook::thrift::concurrency::Monitor.wait:
        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


Changed paths

Path Details
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/Exception.h modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.cpp modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.h modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.h modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/Thread.h modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.h modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.cpp modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/test/Tests.cpp modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadFactoryTests.h modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadManagerTests.h modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/server/TThreadPoolServer.cpp modified , text changed
Directoryincubator/thrift/trunk/lib/cpp/src/server/TThreadPoolServer.h modified , text changed
Directoryincubator/thrift/trunk/test/threads/ThreadsServer.cpp modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26