summaryrefslogtreecommitdiff
path: root/rust/src/main_thread.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2026-02-22 17:08:21 -0800
committerMason Reed <35282038+emesare@users.noreply.github.com>2026-02-23 00:09:44 -0800
commitb18bdad6c94a8e234108d531f0c480c7104abebe (patch)
treeb0edb86cfae52c37635ef0b5cac491220bc3ef24 /rust/src/main_thread.rs
parentdbd54d67a6d523f64615f653d82d8224cd09870a (diff)
[Rust] Misc documentation and cleanup
Diffstat (limited to 'rust/src/main_thread.rs')
-rw-r--r--rust/src/main_thread.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/main_thread.rs b/rust/src/main_thread.rs
index f6fdc7cf..cf4c37f1 100644
--- a/rust/src/main_thread.rs
+++ b/rust/src/main_thread.rs
@@ -21,9 +21,9 @@ impl MainThreadActionExecutor {
}
}
-/// Execute passed function on the main thread. Returns `None` if already running on the main thread.
+/// Execute the passed function on the main thread. Returns `None` if already running on the main thread.
///
-/// When not running in headless this will block the UI.
+/// When not running in headless, this will block the UI.
pub fn execute_on_main_thread<F: Fn() + 'static>(f: F) -> Option<Ref<MainThreadAction>> {
let boxed_executor = Box::new(MainThreadActionExecutor { func: Box::new(f) });
let raw_executor = Box::into_raw(boxed_executor);
@@ -39,9 +39,9 @@ pub fn execute_on_main_thread<F: Fn() + 'static>(f: F) -> Option<Ref<MainThreadA
}
}
-/// Execute passed function on the main thread and wait until the function is finished.
+/// Execute the passed function on the main thread and wait until the function is finished.
///
-/// When not running in headless this will block the UI.
+/// When not running in headless, this will block the UI.
pub fn execute_on_main_thread_and_wait<F: Fn() + 'static>(f: F) {
let boxed_executor = Box::new(MainThreadActionExecutor { func: Box::new(f) });
let raw_executor = Box::into_raw(boxed_executor);