proxygen
TestObserver Class Reference
Inheritance diagram for TestObserver:
folly::ThreadPoolExecutor::Observer

Public Member Functions

void threadStarted (ThreadPoolExecutor::ThreadHandle *) override
 
void threadStopped (ThreadPoolExecutor::ThreadHandle *) override
 
void threadPreviouslyStarted (ThreadPoolExecutor::ThreadHandle *) override
 
void threadNotYetStopped (ThreadPoolExecutor::ThreadHandle *) override
 
void checkCalls ()
 
- Public Member Functions inherited from folly::ThreadPoolExecutor::Observer
virtual ~Observer ()=default
 

Private Attributes

std::atomic< int > threads_ {0}
 

Detailed Description

Definition at line 375 of file ThreadPoolExecutorTest.cpp.

Member Function Documentation

void TestObserver::checkCalls ( )
inline

Definition at line 389 of file ThreadPoolExecutorTest.cpp.

References ASSERT_EQ.

389  {
390  ASSERT_EQ(threads_, 0);
391  }
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:1956
std::atomic< int > threads_
void TestObserver::threadNotYetStopped ( ThreadPoolExecutor::ThreadHandle )
inlineoverridevirtual

Reimplemented from folly::ThreadPoolExecutor::Observer.

Definition at line 386 of file ThreadPoolExecutorTest.cpp.

386  {
387  threads_--;
388  }
std::atomic< int > threads_
void TestObserver::threadPreviouslyStarted ( ThreadPoolExecutor::ThreadHandle )
inlineoverridevirtual

Reimplemented from folly::ThreadPoolExecutor::Observer.

Definition at line 383 of file ThreadPoolExecutorTest.cpp.

383  {
384  threads_++;
385  }
std::atomic< int > threads_
void TestObserver::threadStarted ( ThreadPoolExecutor::ThreadHandle )
inlineoverridevirtual

Implements folly::ThreadPoolExecutor::Observer.

Definition at line 377 of file ThreadPoolExecutorTest.cpp.

377  {
378  threads_++;
379  }
std::atomic< int > threads_
void TestObserver::threadStopped ( ThreadPoolExecutor::ThreadHandle )
inlineoverridevirtual

Implements folly::ThreadPoolExecutor::Observer.

Definition at line 380 of file ThreadPoolExecutorTest.cpp.

380  {
381  threads_--;
382  }
std::atomic< int > threads_

Member Data Documentation

std::atomic<int> TestObserver::threads_ {0}
private

Definition at line 394 of file ThreadPoolExecutorTest.cpp.


The documentation for this class was generated from the following file: