| 234 | // AsyncThread |
| 235 | |
| 236 | AsyncThread::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 | |
| 250 | AsyncThread::~AsyncThread() { |
| 251 | cancel(); |
nothing calls this directly
no test coverage detected