summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2025-03-03 15:28:46 +0100
committerDavid Lönnhager <david.l@mullvad.net>2025-03-05 23:32:45 +0100
commit0a5f4da6c53caed17c2b6e2d0ed02587b0a59a7f (patch)
tree7723d0fc74c167c00b2281e4f0f2c5a114fe0734
parentaba4b7a0d9b8ffb96e11eddd8b13b85737e01391 (diff)
downloadmullvadvpn-0a5f4da6c53caed17c2b6e2d0ed02587b0a59a7f.tar.xz
mullvadvpn-0a5f4da6c53caed17c2b6e2d0ed02587b0a59a7f.zip
Clarify that UI thread is the main thread
-rw-r--r--installer-downloader/src/cacao_impl/delegate.rs2
-rw-r--r--installer-downloader/src/controller.rs2
-rw-r--r--installer-downloader/src/delegate.rs6
-rw-r--r--installer-downloader/src/winapi_impl/delegate.rs2
4 files changed, 6 insertions, 6 deletions
diff --git a/installer-downloader/src/cacao_impl/delegate.rs b/installer-downloader/src/cacao_impl/delegate.rs
index 73c17e7e53..645fc1aa63 100644
--- a/installer-downloader/src/cacao_impl/delegate.rs
+++ b/installer-downloader/src/cacao_impl/delegate.rs
@@ -177,7 +177,7 @@ impl AppWindow {
}
}
-/// This simply mutates the UI on the main thread using the GCD
+/// This simply mutates the UI on the main thread
pub struct Queue {}
impl AppDelegateQueue<AppWindow> for Queue {
diff --git a/installer-downloader/src/controller.rs b/installer-downloader/src/controller.rs
index a8bbbafa26..21931af231 100644
--- a/installer-downloader/src/controller.rs
+++ b/installer-downloader/src/controller.rs
@@ -172,7 +172,7 @@ async fn fetch_app_version_info<Delegate, VersionProvider>(
let (action_tx, mut action_rx) = mpsc::channel(1);
- // show error message (needs to happen on the UI thread)
+ // show error message (needs to happen on the UI (main) thread)
// send Action when user presses a button to continue
queue.queue_main(move |self_| {
self_.hide_download_button();
diff --git a/installer-downloader/src/delegate.rs b/installer-downloader/src/delegate.rs
index a00e33bd13..6eff3a4a37 100644
--- a/installer-downloader/src/delegate.rs
+++ b/installer-downloader/src/delegate.rs
@@ -103,7 +103,7 @@ pub trait AppDelegate {
/// Exit the application
fn quit(&mut self);
- /// Create queue for scheduling actions on UI thread
+ /// Create queue for scheduling actions on UI (main) thread
fn queue(&self) -> Self::Queue;
}
@@ -114,8 +114,8 @@ pub struct ErrorMessage {
pub retry_button_text: String,
}
-/// Schedules actions on the UI thread from other threads
+/// Schedules actions on the UI (main) thread from other threads
pub trait AppDelegateQueue<T: ?Sized>: Send {
- /// Schedule action on the UI thread from other threads
+ /// Schedule action on the UI (main) thread from other threads
fn queue_main<F: FnOnce(&mut T) + 'static + Send>(&self, callback: F);
}
diff --git a/installer-downloader/src/winapi_impl/delegate.rs b/installer-downloader/src/winapi_impl/delegate.rs
index ce69e818b9..3df758b077 100644
--- a/installer-downloader/src/winapi_impl/delegate.rs
+++ b/installer-downloader/src/winapi_impl/delegate.rs
@@ -212,7 +212,7 @@ fn register_frame_click_handler(frame: nwg::ControlHandle, callback: impl Fn() +
}
/// Queue sends a window message to the main window containing a [QueueContext], giving us mutable
-/// access to the [AppDelegate] on the main UI thread.
+/// access to the [AppDelegate] on the UI (main) thread.
///
/// See [QueueContext] docs for more information.
#[derive(Clone)]