proxygen
folly::pushmi::pool Class Reference

#include <pool.h>

Public Member Functions

 pool (std::size_t threads)
 
auto executor ()
 
void stop ()
 
void wait ()
 

Private Attributes

static_thread_pool p
 

Detailed Description

Definition at line 61 of file pool.h.

Constructor & Destructor Documentation

folly::pushmi::pool::pool ( std::size_t  threads)
inlineexplicit

Definition at line 65 of file pool.h.

65 : p(threads) {}
std::vector< std::thread::id > threads
static_thread_pool p
Definition: pool.h:62

Member Function Documentation

auto folly::pushmi::pool::executor ( )
inline

Definition at line 67 of file pool.h.

67  {
68  auto exec = execution::require(
69  p.executor(), execution::never_blocking, execution::oneway);
70  return pool_executor<decltype(exec)>{exec};
71  }
static_thread_pool p
Definition: pool.h:62
void folly::pushmi::pool::stop ( )
inline

Definition at line 73 of file pool.h.

73  {
74  p.stop();
75  }
static_thread_pool p
Definition: pool.h:62
void folly::pushmi::pool::wait ( )
inline

Definition at line 76 of file pool.h.

76  {
77  p.wait();
78  }
static_thread_pool p
Definition: pool.h:62

Member Data Documentation

static_thread_pool folly::pushmi::pool::p
private

Definition at line 62 of file pool.h.


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