MCPcopy Create free account
hub / github.com/apache/datafusion / spawn

Method spawn

datafusion/common-runtime/src/common.rs:40–50  ·  view source on GitHub ↗
(task: T)

Source from the content-addressed store, hash-verified

38
39impl<R: 'static> SpawnedTask<R> {
40 pub fn spawn<T>(task: T) -> Self
41 where
42 T: Future<Output = R>,
43 T: Send + 'static,
44 R: Send,
45 {
46 // Ok to use spawn here as SpawnedTask handles aborting/cancelling the task on Drop
47 #[expect(clippy::disallowed_methods)]
48 let inner = tokio::task::spawn(trace_future(task));
49 Self { inner }
50 }
51
52 pub fn spawn_blocking<T>(task: T) -> Self
53 where

Callers 9

criterion_benchmarkFunction · 0.45
streaming_aggregate_testFunction · 0.45
group_by_stringsFunction · 0.45
run_innerMethod · 0.45
stream_yieldsFunction · 0.45
runtime_shutdownFunction · 0.45
loadMethod · 0.45

Calls 1

trace_futureFunction · 0.85

Tested by 6

streaming_aggregate_testFunction · 0.36
group_by_stringsFunction · 0.36
run_innerMethod · 0.36
stream_yieldsFunction · 0.36