MCPcopy Create free account
hub / github.com/apache/paimon-rust / runtime

Function runtime

crates/integrations/datafusion/src/runtime.rs:36–41  ·  view source on GitHub ↗

Returns a [`Handle`] to the global Tokio runtime. If a Tokio runtime is already entered on the current thread, its handle is returned directly. Otherwise a lazily-initialised global runtime is used.

()

Source from the content-addressed store, hash-verified

34/// If a Tokio runtime is already entered on the current thread, its handle is
35/// returned directly. Otherwise a lazily-initialised global runtime is used.
36pub fn runtime() -> Handle {
37 match Handle::try_current() {
38 Ok(h) => h,
39 _ => global_runtime().handle().clone(),
40 }
41}
42
43// These helpers work around DataFusion FFI callbacks that may run without an
44// entered Tokio runtime. See https://github.com/apache/datafusion/issues/16312.

Callers

nothing calls this directly

Calls 1

global_runtimeFunction · 0.85

Tested by

no test coverage detected