We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RMain::wait_initialized()
1 parent 75cb32b commit 1ab75feCopy full SHA for 1ab75fe
crates/ark/src/interface.rs
@@ -490,6 +490,17 @@ impl RMain {
490
R_MAIN_INIT.get().is_some()
491
}
492
493
+ /// Wait for `RMain` singleton initialization
494
+ ///
495
+ /// Note that R might still not have finished starting up.
496
+ /// See `wait_r_initialized()`.
497
498
+ /// Thread-safe. But note you can only get access to the singleton on the R
499
+ /// thread.
500
+ pub fn wait_initialized() {
501
+ R_MAIN_INIT.wait();
502
+ }
503
+
504
/// Access a reference to the singleton instance of this struct
505
///
506
/// SAFETY: Accesses must occur after `start_r()` initializes it, and must
0 commit comments