Skip to content

Commit e5c992a

Browse files
authored
Update 3. Lifetime management.md
1 parent 34646fd commit e5c992a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Part 1 - Getting Started/3. Lifetime management.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ s.unsubscribe();
128128
Clean
129129
```
130130

131-
`Subscriptions.create` takes an action that will be executed on unsubscription to release the resources. There also are shorthand for common actions when creating a sequence.
132-
* `Subscriptions.empty()` returns a `Subscription` that does nothing when disposed. This is useful when you are required to return an instance of `Subscription`, but your implementation doesn't actually need to release any resources.
133-
* `Subscriptions.from(Subscription... subscriptions)` returns a `Subscription` that will dispose of multiple other subscriptions when it is disposed.
134-
* `Subscriptions.unsubscribed()` returns a `Subscription` that is already disposed of.
131+
`Subscriptions.create` получает действие, которое будет выполнено при отписке для освобождения ресурсов. Также есть несколько сокращений для частых действий при создании последовательности.
132+
* `Subscriptions.empty()` возвращает `Subscription`, которая ничего не делает при уничтожении. Это удобано, когда вам нужно вернуть экземпляр `Subscription`, но ваша реализация не нуждается в освобождении ресурсов.
133+
* `Subscriptions.from(Subscription... subscriptions)` возвращает `Subscription`, которая уничтожает несколько других подписок при своём уничтожении.
134+
* `Subscriptions.unsubscribed()` возвращает `Subscription`, которая уже уничтожена.
135135

136-
There are several implementations of `Subscription`.
136+
Есть несколько реализаций `Subscription`.
137137

138138
* `BooleanSubscription`
139139
* `CompositeSubscription`
@@ -146,7 +146,7 @@ There are several implementations of `Subscription`.
146146
* `Subscriber`
147147
* `TestSubscriber`
148148

149-
We will see more of them later in this book. It is interesting to note that `Subscriber` also implements `Subscription`. This means that we can also use a reference to a `Subscriber` to terminate a subscription.
149+
Мы рассмотрим больше их примеров позже в книге. Интересно отметить, что `Subscriber` также реализует `Subscription`. Это означает, что мы также можем использовать ссылку на `Subscriber` для прерывания подписки.
150150

151151
#### Продолжить чтение
152152

0 commit comments

Comments
 (0)