Instance Property
events
Back-pressure-aware async stream of TorEvent values for this session.
var events: AsyncStream<TorEvent> { get async }
Discussion
Each access returns a fresh subscriber stream — conformers are expected to multiplex events to all live subscribers, so two consumers see identical sequences (no fan-in, no replay of past events). Conformers must complete the stream exactly once, when stop() fully releases resources.
Stability: values are delivered in causal order; a .bootstrap(progress: 100) event is never observed before some .stateChanged(.starting) event.
Typical use: subscribe in a background Task that logs, updates a SwiftUI @Observable state model, or applies backoff when TorEvent.stateChanged(_:) reports .failed(_).
Important
Subscribers that stop consuming will eventually cause the conformer to apply back-pressure or drop events — the buffering policy is implementation-defined. Always consume or explicitly cancel the task holding the iterator.