| 464 | } |
| 465 | |
| 466 | bool cmUVProcessChain::Wait(uint64_t milliseconds) |
| 467 | { |
| 468 | bool timeout = false; |
| 469 | cm::uv_timer_ptr timer; |
| 470 | |
| 471 | if (milliseconds > 0) { |
| 472 | timer.init(*this->Data->Loop, &timeout); |
| 473 | timer.start( |
| 474 | [](uv_timer_t* handle) { |
| 475 | auto* timeoutPtr = static_cast<bool*>(handle->data); |
| 476 | *timeoutPtr = true; |
| 477 | }, |
| 478 | milliseconds, 0, cm::uv_update_time::yes); |
| 479 | } |
| 480 | |
| 481 | while (!timeout && |
| 482 | this->Data->ProcessesCompleted < this->Data->Processes.size()) { |
| 483 | uv_run(this->Data->Loop, UV_RUN_ONCE); |
| 484 | } |
| 485 | |
| 486 | return !timeout; |
| 487 | } |
| 488 | |
| 489 | std::vector<cmUVProcessChain::Status const*> cmUVProcessChain::GetStatus() |
| 490 | const |