MCPcopy Create free account
hub / github.com/Snapchat/Valdi / flushUpToNow

Method flushUpToNow

valdi_core/src/valdi_core/cpp/Threading/TaskQueue.cpp:237–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235 if (_disposed || !hasTask) {
236 *shouldRun = false;
237 } else {
238 nextTaskFunction = std::move(_tasks.front().function);
239 *parentSpanId = _tasks.front().parentSpanId;
240 _currentRunningTasks++;
241 _tasks.pop_front();
242 }
243 return nextTaskFunction;
244}
245
246size_t TaskQueue::flush() {
247 size_t ranTasks = 0;

Callers 2

dispatchOnJsThreadMethod · 0.80
~JSContextWrapperMethod · 0.80

Calls 1

nowFunction · 0.50

Tested by 2

dispatchOnJsThreadMethod · 0.64
~JSContextWrapperMethod · 0.64