MCPcopy Create free account
hub / github.com/dds-bridge/dds / Reset

Method Reset

library/src/system/thread_mgr.cpp:27–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25ThreadMgr::~ThreadMgr() { }
26
27void ThreadMgr::Reset(const int nThreads)
28{
29 const unsigned n = static_cast<unsigned>(nThreads);
30 if (n > numRealThreads)
31 {
32 realThreads.resize(n);
33 for (unsigned t = numRealThreads; t < n; t++)
34 realThreads[t] = false;
35 numRealThreads = n;
36 }
37
38 if (n > numMachineThreads)
39 {
40 machineThreads.resize(n);
41 for (unsigned t = numMachineThreads; t < n; t++)
42 machineThreads[t] = -1;
43 numMachineThreads = n;
44 }
45}
46
47
48int ThreadMgr::Occupy(const int machineId)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected