aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/sync_executor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/sync_executor.rs')
-rw-r--r--crates/shirabe/src/util/sync_executor.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/crates/shirabe/src/util/sync_executor.rs b/crates/shirabe/src/util/sync_executor.rs
index b7512c2d..ee0995fc 100644
--- a/crates/shirabe/src/util/sync_executor.rs
+++ b/crates/shirabe/src/util/sync_executor.rs
@@ -1,10 +1,16 @@
//! Minimal synchronous future executor used as a drop-in for the `tokio::runtime::Runtime::new()`
//! + `block_on` sync bridges scattered across the codebase (repository / installer / downloader).
//!
-//! Those bridges drive `async fn`s whose `.await` points all resolve synchronously: the only async
-//! I/O (reqwest in `CurlDownloader`) is performed through a blocking client, so no reactor is
-//! required. Nesting `tokio` runtimes is forbidden ("Cannot start a runtime from within a runtime"),
-//! which is why this no-reactor executor exists; it can be nested freely.
+//! Those bridges drive `async fn`s whose `.await` points all resolve synchronously — this relies
+//! on the invariant below. `CurlDownloader` no longer qualifies: it now performs real async I/O
+//! via a non-blocking `reqwest::Client`, so `HttpDownloader` drives it through its own dedicated
+//! `tokio::runtime::Runtime` instead (see `http_downloader::curl_runtime`), not through this
+//! module. The other call sites (`file_downloader.rs`, `version_guesser.rs`,
+//! `installation_manager.rs`, `composer_repository.rs`, `sync_helper.rs`) still rely on this
+//! module because none of their awaited futures actually park on a reactor.
+//!
+//! Nesting `tokio` runtimes is forbidden ("Cannot start a runtime from within a runtime"), which is
+//! why this no-reactor executor exists for those remaining call sites; it can be nested freely.
//!
//! TODO(phase-e): remove this module once the async bridges are either made genuinely synchronous or
//! consolidated onto a single shared runtime driven from `main`.