Skip to content

Commit c742db2

Browse files
authored
Repair some corner cases in cancellation propagation between coroutines and listenable futures (#2222)
* Repair some corner cases in cancellation propagation between coroutines and listenable futures Implement bidirectional cancellation for `future` coroutine builder. This also: * Refactors JobListenableFuture infrastructure so it can be reused in CoroutineScope.future and Deferred.asListenableFuture; * Provides more descriptive `toString` implementation for the returned Future; * Fixes stack traces in thrown exception, so it includes a call to get() that triggered the exception to be thrown; * Hides ListenableFuture.asDeferred return type, so it can't be cast to CompletableDeferred; * Adds more tests to cover fixed corner cases; * Improves documentation; * Suppresses annoying warnings in tests. Fixes #1442
1 parent 0e5aefd commit c742db2

File tree

2 files changed

+307
-146
lines changed

2 files changed

+307
-146
lines changed

0 commit comments

Comments
 (0)