MCPcopy Create free account
hub / github.com/angular-rust/ux-components / set_initialized

Function set_initialized

src/rendering/backend/native/rt.rs:57–66  ·  view source on GitHub ↗

Informs this crate that Clutter has been initialized and the current thread is the main one.

()

Source from the content-addressed store, hash-verified

55
56/// Informs this crate that Clutter has been initialized and the current thread is the main one.
57pub unsafe fn set_initialized() {
58 skip_assert_initialized!();
59 if is_initialized_main_thread() {
60 return;
61 } else if is_initialized() {
62 panic!("Attempted to initialize GDK from two different threads.");
63 }
64 INITIALIZED.store(true, Ordering::Release);
65 IS_MAIN_THREAD.with(|c| c.set(true));
66}
67
68pub fn init() {
69 assert_not_initialized!();

Callers

nothing calls this directly

Calls 4

is_initializedFunction · 0.85
setMethod · 0.80
withMethod · 0.45

Tested by

no test coverage detected