| 576 | } |
| 577 | |
| 578 | bool cmWorkerPoolInternal::Process() |
| 579 | { |
| 580 | // Reset state flags |
| 581 | this->Processing = true; |
| 582 | this->Aborting = false; |
| 583 | // Initialize libuv asynchronous request |
| 584 | this->UVRequestBegin.init(*this->UVLoop, &cmWorkerPoolInternal::UVSlotBegin, |
| 585 | this); |
| 586 | this->UVRequestEnd.init(*this->UVLoop, &cmWorkerPoolInternal::UVSlotEnd, |
| 587 | this); |
| 588 | // Send begin request |
| 589 | this->UVRequestBegin.send(); |
| 590 | // Run libuv loop |
| 591 | bool success = (uv_run(this->UVLoop.get(), UV_RUN_DEFAULT) == 0); |
| 592 | // Update state flags |
| 593 | this->Processing = false; |
| 594 | this->Aborting = false; |
| 595 | return success; |
| 596 | } |
| 597 | |
| 598 | void cmWorkerPoolInternal::Abort() |
| 599 | { |