MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / ThreadPoolManager

Method ThreadPoolManager

src/ThreadPool.cpp:13–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11ThreadPoolManager* ThreadPoolManager::instance;
12
13ThreadPoolManager::ThreadPoolManager(unsigned int _max_threads, unsigned int flags) : flags(flags)
14{
15 if (_max_threads == 0) {
16 _max_threads = 1;
17 }
18
19 max_threads = _max_threads-1;
20 available_threads = max_threads;
21 pthread_mutex_init(&mp, NULL);
22 main_pthread = pthread_self();
23}
24
25
26ThreadPool* ThreadPoolManager::newThreadPool(const std::string& name)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected