<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/TorSession/events",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor0A7SessionP6eventsScSyAA0A5EventOGvp"
  },
  "title" : "events"
}
-->

# events

Back-pressure-aware async stream of [`TorEvent`](/documentation/Tor/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()`](/documentation/Tor/TorSession/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
  ``doc://Tor/documentation/Tor/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.