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: CHANGES.md
+13
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,18 @@
1
1
# Change log for kotlinx.coroutines
2
2
3
+
## Version 1.8.1
4
+
5
+
* Remove the `@ExperimentalTime` annotation from usages of `TimeSource` (#4046). Thanks, @hfhbd!
6
+
* Introduce a workaround for an Android bug that caused an occasional `NullPointerException` when setting the `StateFlow` value on old Android devices (#3820).
7
+
* No longer use `kotlin.random.Random` as part of `Dispatchers.Default` and `Dispatchers.IO` initialization (#4051).
8
+
*`Flow.timeout` throws the exception with which the channel was closed (#4071).
9
+
* Small tweaks and documentation fixes.
10
+
11
+
### Changelog relative to version 1.8.1-Beta
12
+
13
+
*`Flow.timeout` throws the exception with which the channel was closed (#4071).
14
+
* Small documentation fixes.
15
+
3
16
## Version 1.8.1-Beta
4
17
5
18
* Remove the `@ExperimentalTime` annotation from usages of `TimeSource` (#4046). Thanks, @hfhbd!
@@ -328,7 +331,8 @@ fun loadContributorsCallbacks(
328
331
*The logic for handling the responses is extracted into callbacks: the corresponding lambdas start at lines `#1` and `#2`.
329
332
330
333
However, the provided solution doesn't work. If you run the program and load contributors by choosing the _CALLBACKS_
331
-
option, you'll see that nothing is shown. However, the tests that immediately return the result pass.
334
+
option, you'll see that nothing is shown. However, the test from `Request3CallbacksKtTest` immediately returns the result
335
+
that it successfully passed.
332
336
333
337
Think about why the given code doesn't work as expected and try to fix it, or see the solutions below.
334
338
@@ -1206,8 +1210,8 @@ When the channel is full, the next `send` call on it is suspended until more fre
1206
1210
<def title="Rendezvous channel">
1207
1211
<p>The"Rendezvous" channel is a channel without a buffer, the same as a buffered channel with zero size.
1208
1212
One of the functions (<code>send()</code>or<code>receive()</code>) is always suspended until the other is called. </p>
1209
-
<p>If the <code>send()</code> function is called and there's no suspended <code>receive</code> call ready to process the element, then <code>send()</code>
1210
-
is suspended. Similarly, if the <code>receive</code> function is called and the channel is empty or, in other words, there's no
1213
+
<p>If the <code>send()</code> function is called and there's no suspended <code>receive()</code> call ready to process the element, then <code>send()</code>
1214
+
is suspended. Similarly, if the <code>receive()</code> function is called and the channel is empty or, in other words, there's no
1211
1215
suspended <code>send()</code> call ready to send the element, the <code>receive()</code> call is suspended. </p>
1212
1216
<p>The"rendezvous" name ("a meeting at an agreed time and place") refers to the fact that <code>send()</code>and<code>receive()</code>
Copy file name to clipboardExpand all lines: docs/topics/exception-handling.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ The output of this code is (with [debug](https://github.com/Kotlin/kotlinx.corou
60
60
61
61
```text
62
62
Throwing exception from launch
63
-
Exception in thread "DefaultDispatcher-worker-2 @coroutine#2" java.lang.IndexOutOfBoundsException
63
+
Exception in thread "DefaultDispatcher-worker-1 @coroutine#2" java.lang.IndexOutOfBoundsException
64
64
Joined failed job
65
65
Throwing exception from async
66
66
Caught ArithmeticException
@@ -73,7 +73,7 @@ Caught ArithmeticException
73
73
It is possible to customize the default behavior of printing **uncaught** exceptions to the console.
74
74
[CoroutineExceptionHandler] context element on a _root_ coroutine can be used as a generic `catch` block for
75
75
this root coroutine and all its children where custom exception handling may take place.
76
-
It is similar to [`Thread.uncaughtExceptionHandler`](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler)).
76
+
It is similar to [`Thread.uncaughtExceptionHandler`](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setUncaughtExceptionHandler-java.lang.Thread.UncaughtExceptionHandler-).
77
77
You cannot recover from the exception in the `CoroutineExceptionHandler`. The coroutine had already completed
78
78
with the corresponding exception when the handler is called. Normally, the handler is used to
79
79
log the exception, show some kind of error message, terminate, and/or restart the application.
0 commit comments