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

Method taskCompletionFuture

bolt/exec/Task.cpp:2485–2497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2483}
2484
2485ContinueFuture Task::taskCompletionFuture() {
2486 std::lock_guard<std::timed_mutex> l(mutex_);
2487 // If 'this' is running, the future is realized on timeout or when
2488 // this no longer is running.
2489 if (not isRunningLocked()) {
2490 return makeFinishFutureLocked(
2491 fmt::format("Task::taskCompletionFuture {}", taskId_).data());
2492 }
2493 auto [promise, future] = makeBoltContinuePromiseContract(
2494 fmt::format("Task::taskCompletionFuture {}", taskId_));
2495 taskCompletionPromises_.emplace_back(std::move(promise));
2496 return std::move(future);
2497}
2498
2499std::string Task::toString() const {
2500 std::lock_guard<std::timed_mutex> l(mutex_);

Callers 10

abortMethod · 0.80
DEBUG_ONLY_TEST_FFunction · 0.80
runOneMethod · 0.80
waitForTaskCompletionMethod · 0.80
readResultsMethod · 0.80
TEST_FFunction · 0.80
waitForTaskStateChangeFunction · 0.80
checkTaskErrorMethod · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 2

dataMethod · 0.45

Tested by 8

DEBUG_ONLY_TEST_FFunction · 0.64
runOneMethod · 0.64
waitForTaskCompletionMethod · 0.64
readResultsMethod · 0.64
TEST_FFunction · 0.64
waitForTaskStateChangeFunction · 0.64
checkTaskErrorMethod · 0.64
runMethod · 0.64