MCPcopy Create free account
hub / github.com/bytedance/bolt / checkTaskError

Method checkTaskError

bolt/exec/tests/utils/Cursor.cpp:371–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369
370 private:
371 void checkTaskError() {
372 if (!task_->error()) {
373 return;
374 }
375 // Wait for the task to finish (there's' a small period of time between
376 // when the error is set on the Task and terminate is called).
377 task_->taskCompletionFuture()
378 .within(std::chrono::microseconds(5'000'000))
379 .wait();
380
381 // Wait for all task drivers to finish to avoid destroying the executor_
382 // before task_ finished using it and causing a crash.
383 waitForTaskDriversToFinish(task_.get());
384 std::rethrow_exception(task_->error());
385 }
386
387 const int32_t maxDrivers_;
388 const int32_t numConcurrentSplitGroups_;

Callers

nothing calls this directly

Calls 5

waitMethod · 0.80
taskCompletionFutureMethod · 0.80
errorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected