MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / enqueue

Method enqueue

MonaBase/include/Mona/PoolThreads.h:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43 template<typename WorkThreadType>
44 PoolThread* enqueue(Exception& ex, const std::shared_ptr<WorkThreadType>& pWork, PoolThread* pThread = NULL) {
45 if (!pThread) {
46 pThread = _threads.front();
47 _threads.pop_front();
48 _threads.emplace_back(pThread);
49 }
50 pThread->push<WorkThreadType>(ex, pWork);
51 return pThread;
52 }
53
54private:
55 std::deque<PoolThread*> _threads;

Callers 1

decodeMethod · 0.80

Calls 1

frontMethod · 0.80

Tested by

no test coverage detected