(&self, name: &str, f: impl FnOnce() -> T + Send)
| 33 | } |
| 34 | |
| 35 | fn on_thread<T: Send>(&self, name: &str, f: impl FnOnce() -> T + Send) -> T { |
| 36 | std::thread::scope(|s| { |
| 37 | std::thread::Builder::new() |
| 38 | .name(name.to_string()) |
| 39 | .spawn_scoped(s, || tracing::dispatcher::with_default(&self.dispatch, f)) |
| 40 | .unwrap() |
| 41 | .join() |
| 42 | .unwrap() |
| 43 | }) |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | /// The span `QueryEngine::execute` creates. |
no test coverage detected