You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,16 +24,16 @@ The owner of a `Signal` has unilateral control of the event stream. Observers ma
24
24
It is like a live TV feed — you can observe and react to the content, but you cannot have a side effect on the live feed or the TV station.
25
25
26
26
```swift
27
-
let channel: Signal<Programme, NoError> = tvStation.channelOne
28
-
channel.observeValues { programmein... }
27
+
let channel: Signal<Program, NoError> = tvStation.channelOne
28
+
channel.observeValues { programin... }
29
29
```
30
30
31
31
#### `Event`: the basic transfer unit of an event stream.
32
32
A `Signal` may have any arbitrary number of events carrying a value, following by an eventual terminal event of a specific reason.
33
33
34
34
It is like a frame in a one-time live feed — seas of data frames carry the visual and audio data, but the feed would eventually be terminated with a special frame to indicate "end of stream".
35
35
36
-
#### `SignalProducer`: deferred work that creates a stream of value.
36
+
#### `SignalProducer`: deferred work that creates a stream of values.
37
37
`SignalProducer` defers work — of which the output is represented as a stream of value — until it is started. For every invocation to start the `SignalProducer`, a new `Signal` is created and the deferred work is subsequently invoked.
38
38
39
39
It is like a on-demand streaming service — even though the episode is streamed like a live TV feed, you can choose what you watch, when to start watching and when to interrupt it.
0 commit comments