MCPcopy Create free account
hub / github.com/apache/arrow / TryAddCallback

Method TryAddCallback

cpp/src/arrow/util/future.cc:71–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 bool TryAddCallback(const std::function<Callback()>& callback_factory,
72 CallbackOptions opts) {
73 CheckOptions(opts);
74 std::unique_lock<std::mutex> lock(mutex_);
75 if (IsFutureFinished(state_)) {
76 return false;
77 } else {
78 callbacks_.push_back({callback_factory(), opts});
79 return true;
80 }
81 }
82
83 static bool ShouldScheduleCallback(const CallbackRecord& callback_record,
84 bool in_add_callback) {

Callers

nothing calls this directly

Calls 3

IsFutureFinishedFunction · 0.85
push_backMethod · 0.80
CheckOptionsFunction · 0.50

Tested by

no test coverage detected