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

Function RunSynchronously

cpp/src/arrow/util/thread_pool.h:586–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584/// future has finished.
585template <typename Fut, typename ValueType = typename Fut::ValueType>
586typename Fut::SyncType RunSynchronously(FnOnce<Fut(Executor*)> get_future,
587 bool use_threads) {
588 if (use_threads) {
589 auto fut = std::move(get_future)(GetCpuThreadPool());
590 return FutureToSync(fut);
591 } else {
592 return SerialExecutor::RunInSerialExecutor<ValueType>(std::move(get_future));
593 }
594}
595
596/// \brief Potentially iterate an async generator serially (if use_threads is false)
597/// using a potentially custom Executor

Callers 2

RunMethod · 0.85
RunVoidMethod · 0.85

Calls 2

GetCpuThreadPoolFunction · 0.85
FutureToSyncFunction · 0.85

Tested by 2

RunMethod · 0.68
RunVoidMethod · 0.68