Instance Method
waitUntilBootstrapped(timeout:)
Block until Tor reports 100% bootstrap progress, or fail after timeout.
func waitUntilBootstrapped(timeout: Duration) async throws
Parameters
-
timeout
-
Maximum Duration to wait before throwing.
Discussion
Bootstrap progress is driven by the Tor control-protocol status/bootstrap-phase GETINFO key (control-spec.txt §3.9) and surfaces as TorEvent.bootstrap(progress:tag:summary:) on the events stream. Typical cold-boot bootstrap on a public guard takes 30–60 seconds; a warm boot with a reused cacheDirectory can complete in 5–10 seconds (see TorConfiguration.cacheDirectory performance tip).
Throws
TorError.timeout when timeout elapses before 100% bootstrap is reached, and TorError.notStarted if the session is idle/stopped when invoked.
Note
Progress is strictly monotonic — an event at 75% implies every lower-percentage event has already been delivered.