Modified PosixThreadFactory
authorMarc Slemko <marc@apache.org>
Tue, 5 Jun 2007 22:20:14 +0000 (22:20 +0000)
committerMarc Slemko <marc@apache.org>
Tue, 5 Jun 2007 22:20:14 +0000 (22:20 +0000)
commita647903dd2edaa8cf846fe9dac4df82cf74740a0
treea844a1aa23e630d62c2e918cbd55ef96cc019caa
parent67606e5d7207874d003bc9ba433edd66d74662f0
Modified PosixThreadFactory
        Added explicit detached getter and setter
Modified PosixThreadFactory::~PThread:
        Check for join failing and don't transition to detached_ state if it does.  Potential thread-handle leak for
        threads created joinable who aren't referenced by any external thread.  Solution for now has to be
        "DONT DO THAT", the clever approach doesn't always work.

Added ThreadFactoryTests.floodNThreads:
        Loop M times for N threads where M x N is bigger than 32K to verify that detached threads can be created
        ad infinitum.

Reviewed By: mcslee

Revert Plan: revertible

Test Plan: concurrency_test thread-factory passes

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665130 13f79535-47bb-0310-9956-ffa450edef68
lib/cpp/src/concurrency/PosixThreadFactory.cpp
lib/cpp/src/concurrency/PosixThreadFactory.h
lib/cpp/src/concurrency/Thread.h
lib/cpp/src/concurrency/ThreadManager.cpp
lib/cpp/src/concurrency/test/Tests.cpp
lib/cpp/src/concurrency/test/ThreadFactoryTests.h
lib/cpp/src/concurrency/test/ThreadManagerTests.h