MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / AsyncThread

Method AsyncThread

Source/Common/Async.cpp:236–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234// AsyncThread
235
236AsyncThread::AsyncThread()
237 : _nextProcess(0)
238 , _nextStealFrom(0)
239 , _stopping(false)
240 , _process(std::max(std::thread::hardware_concurrency(), 4u) - 1) {
241 for (int i = 0; i < s_cast<int>(_process.size()); i++) {
242 _process[i] = New<Async>();
243 _process[i]->bindPool(this, s_cast<size_t>(i));
244 }
245 for (int i = 0; i < s_cast<int>(_process.size()); i++) {
246 _process[i]->initThreadOnce();
247 }
248}
249
250AsyncThread::~AsyncThread() {
251 cancel();

Callers

nothing calls this directly

Calls 4

bindPoolMethod · 0.80
initThreadOnceMethod · 0.80
maxFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected