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

Method join_unwind_mut

datafusion/common-runtime/src/common.rs:87–97  ·  view source on GitHub ↗

Joins the task using a mutable reference and unwinds the panic if it happens. This method is similar to [`join_unwind`](Self::join_unwind), but takes a mutable reference instead of consuming `self`. This allows the `SpawnedTask` to remain usable after the call. If called multiple times on the same task: - If the task is still running, it will continue waiting for completion - If the task has alr

(&mut self)

Source from the content-addressed store, hash-verified

85 /// - If the task panicked, the first call will resume the panic, and the
86 /// program will not reach subsequent calls
87 pub async fn join_unwind_mut(&mut self) -> Result<R, JoinError> {
88 self.await.map_err(|e| {
89 // `JoinError` can be caused either by panic or cancellation. We have to handle panics:
90 if e.is_panic() {
91 std::panic::resume_unwind(e.into_panic());
92 } else {
93 log::warn!("SpawnedTask was polled during shutdown");
94 e
95 }
96 })
97 }
98}
99
100impl<R> Future for SpawnedTask<R> {

Callers 1

join_unwindMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected