Skip to content

Commit 8d5ccb5

Browse files
committed
Mention Kotlin's Deferred
1 parent c06d70a commit 8d5ccb5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,10 @@ other than `Future`, such as [`Flow.Publisher`](
13711371
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/Flow.Publisher.html
13721372
), [`org.reactivestreams.Publisher`](
13731373
https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/org/reactivestreams/Publisher.html),
1374-
or RxJava's [`Observable`](http://reactivex.io/RxJava/javadoc/io/reactivex/Observable.html).
1374+
RxJava's [`Observable`](http://reactivex.io/RxJava/javadoc/io/reactivex/Observable.html), or
1375+
Kotlin's [`Deferred`](
1376+
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-deferred/index.html
1377+
).
13751378

13761379
<a name="future-method-failure-paths"></a>
13771380
[#](#future-method-failure-paths) Ft.3. If a method returns a `Future` and some logic in the
@@ -1407,8 +1410,8 @@ The point of this refactoring is unification of failure paths, so that the users
14071410
have to deal with multiple different ways of handling errors from the method.
14081411

14091412
Similarly to [the previous item](#future-method-no-blocking), this consideration also applies when
1410-
a method returns any object representing an asynchronous execution other than `Future`, such as a
1411-
`Publisher`.
1413+
a method returns any object representing an asynchronous execution other than `Future`, such as
1414+
`Publisher` or Kotlin's `Deferred`.
14121415

14131416
### Thread interruption and `Future` cancellation
14141417

0 commit comments

Comments
 (0)