MCPcopy Create free account
hub / github.com/angular/angular / on_thread

Method on_thread

packages/compiler-cli/preprocessor/ng-analyze/src/perf/tests.rs:35–44  ·  view source on GitHub ↗
(&self, name: &str, f: impl FnOnce() -> T + Send)

Source from the content-addressed store, hash-verified

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.

Calls 3

unwrapMethod · 0.65
joinMethod · 0.65
nameMethod · 0.45

Tested by

no test coverage detected