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
+18
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,23 @@
1
1
# Change log for kotlinx.coroutines
2
2
3
+
## Version 1.2.1
4
+
5
+
Major:
6
+
* Infrastructure for testing coroutine-specific code in `kotlinx-coroutines-test`: `runBlockingTest`, `TestCoroutineScope` and `TestCoroutineDispatcher`, contributed by Sean McQuillan (@objcode). Obsolete `TestCoroutineContext` from `kotlinx-coroutines-core` is deprecated.
7
+
*`Job.asCompletableFuture` extension in jdk8 module (#1113).
8
+
9
+
Flow improvements:
10
+
*`flowViaChannel` rework: block parameter is no longer suspending, but provides `CoroutineScope` receiver and allows conflated channel (#1081, #1112).
11
+
* New operators: `switchMap`, `sample`, `debounce` (#1107).
12
+
*`consumerEach` is deprecated on `Publisher`, `ObservableSource` and `MaybeSource`, `collect` extension is introduced instead (#1080).
13
+
14
+
Other:
15
+
* Race in Job.join and concurrent cancellation is fixed (#1123).
16
+
* Stacktrace recovery machinery improved: cycle detection works through recovered exceptions, cancellation exceptions are recovered on cancellation fast-path.
17
+
* Atomicfu-related bug fixes: publish transformed artifacts, do not propagate transitive atomicfu dependency (#1064, #1116).
18
+
* Publication to NPM fixed (#1118).
19
+
* Misplaced resources are removed from the final jar (#1131).
This gives you access to Android [Dispatchers.Main](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-android/kotlinx.coroutines.android/kotlinx.coroutines.-dispatchers/index.html)
@@ -171,15 +172,15 @@ R8 is a replacement for ProGuard in Android ecosystem, it is enabled by default
171
172
### JS
172
173
173
174
[Kotlin/JS](https://kotlinlang.org/docs/reference/js-overview.html) version of `kotlinx.coroutines` is published as
Copy file name to clipboardExpand all lines: binary-compatibility-validator/reference-public-api/kotlinx-coroutines-core.txt
+3
Original file line number
Diff line number
Diff line change
@@ -796,6 +796,7 @@ public final class kotlinx/coroutines/flow/FlowKt {
796
796
public static final fun combineLatest (Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/flow/Flow;
797
797
public static final fun count (Lkotlinx/coroutines/flow/Flow;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
798
798
public static final fun count (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
799
+
public static final fun debounce (Lkotlinx/coroutines/flow/Flow;J)Lkotlinx/coroutines/flow/Flow;
799
800
public static final fun delayEach (Lkotlinx/coroutines/flow/Flow;J)Lkotlinx/coroutines/flow/Flow;
800
801
public static final fun delayFlow (Lkotlinx/coroutines/flow/Flow;J)Lkotlinx/coroutines/flow/Flow;
801
802
public static final fun distinctUntilChanged (Lkotlinx/coroutines/flow/Flow;)Lkotlinx/coroutines/flow/Flow;
@@ -833,8 +834,10 @@ public final class kotlinx/coroutines/flow/FlowKt {
833
834
public static final fun reduce (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
834
835
public static final fun retry (Lkotlinx/coroutines/flow/Flow;ILkotlin/jvm/functions/Function1;)Lkotlinx/coroutines/flow/Flow;
835
836
public static synthetic fun retry$default (Lkotlinx/coroutines/flow/Flow;ILkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
837
+
public static final fun sample (Lkotlinx/coroutines/flow/Flow;J)Lkotlinx/coroutines/flow/Flow;
836
838
public static final fun single (Lkotlinx/coroutines/flow/Flow;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
837
839
public static final fun singleOrNull (Lkotlinx/coroutines/flow/Flow;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
840
+
public static final fun switchMap (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
838
841
public static final fun take (Lkotlinx/coroutines/flow/Flow;I)Lkotlinx/coroutines/flow/Flow;
839
842
public static final fun takeWhile (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
840
843
public static final fun toCollection (Lkotlinx/coroutines/flow/Flow;Ljava/util/Collection;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Copy file name to clipboardExpand all lines: binary-compatibility-validator/reference-public-api/kotlinx-coroutines-jdk8.txt
+1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
public final class kotlinx/coroutines/future/FutureKt {
2
2
public static final fun asCompletableFuture (Lkotlinx/coroutines/Deferred;)Ljava/util/concurrent/CompletableFuture;
3
+
public static final fun asCompletableFuture (Lkotlinx/coroutines/Job;)Ljava/util/concurrent/CompletableFuture;
3
4
public static final fun asDeferred (Ljava/util/concurrent/CompletionStage;)Lkotlinx/coroutines/Deferred;
4
5
public static final fun await (Ljava/util/concurrent/CompletionStage;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
5
6
public static final fun future (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/CoroutineStart;Lkotlin/jvm/functions/Function2;)Ljava/util/concurrent/CompletableFuture;
Copy file name to clipboardExpand all lines: binary-compatibility-validator/reference-public-api/kotlinx-coroutines-reactive.txt
+1
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ public final class kotlinx/coroutines/reactive/AwaitKt {
8
8
}
9
9
10
10
public final class kotlinx/coroutines/reactive/ChannelKt {
11
+
public static final fun collect (Lorg/reactivestreams/Publisher;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
11
12
public static final fun consumeEach (Lorg/reactivestreams/Publisher;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
12
13
public static final fun openSubscription (Lorg/reactivestreams/Publisher;I)Lkotlinx/coroutines/channels/ReceiveChannel;
13
14
public static synthetic fun openSubscription$default (Lorg/reactivestreams/Publisher;IILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
Copy file name to clipboardExpand all lines: binary-compatibility-validator/reference-public-api/kotlinx-coroutines-rx2.txt
+2
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ public final class kotlinx/coroutines/rx2/RxAwaitKt {
12
12
}
13
13
14
14
public final class kotlinx/coroutines/rx2/RxChannelKt {
15
+
public static final fun collect (Lio/reactivex/MaybeSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
16
+
public static final fun collect (Lio/reactivex/ObservableSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
15
17
public static final fun consumeEach (Lio/reactivex/MaybeSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
16
18
public static final fun consumeEach (Lio/reactivex/ObservableSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
17
19
public static final fun openSubscription (Lio/reactivex/MaybeSource;)Lkotlinx/coroutines/channels/ReceiveChannel;
public abstract interface class kotlinx/coroutines/test/DelayController {
2
+
public abstract fun advanceTimeBy (J)J
3
+
public abstract fun advanceUntilIdle ()J
4
+
public abstract fun cleanupTestCoroutines ()V
5
+
public abstract fun getCurrentTime ()J
6
+
public abstract fun pauseDispatcher ()V
7
+
public abstract fun pauseDispatcher (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
8
+
public abstract fun resumeDispatcher ()V
9
+
public abstract fun runCurrent ()V
10
+
}
11
+
12
+
public final class kotlinx/coroutines/test/TestBuildersKt {
13
+
public static final fun runBlockingTest (Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)V
14
+
public static final fun runBlockingTest (Lkotlinx/coroutines/test/TestCoroutineDispatcher;Lkotlin/jvm/functions/Function2;)V
15
+
public static final fun runBlockingTest (Lkotlinx/coroutines/test/TestCoroutineScope;Lkotlin/jvm/functions/Function2;)V
16
+
public static synthetic fun runBlockingTest$default (Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
17
+
}
18
+
19
+
public final class kotlinx/coroutines/test/TestCoroutineDispatcher : kotlinx/coroutines/CoroutineDispatcher, kotlinx/coroutines/Delay, kotlinx/coroutines/test/DelayController {
20
+
public fun <init> ()V
21
+
public fun advanceTimeBy (J)J
22
+
public fun advanceUntilIdle ()J
23
+
public fun cleanupTestCoroutines ()V
24
+
public fun delay (JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
25
+
public fun dispatch (Lkotlin/coroutines/CoroutineContext;Ljava/lang/Runnable;)V
26
+
public fun dispatchYield (Lkotlin/coroutines/CoroutineContext;Ljava/lang/Runnable;)V
27
+
public fun getCurrentTime ()J
28
+
public fun invokeOnTimeout (JLjava/lang/Runnable;)Lkotlinx/coroutines/DisposableHandle;
29
+
public fun pauseDispatcher ()V
30
+
public fun pauseDispatcher (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
31
+
public fun resumeDispatcher ()V
32
+
public fun runCurrent ()V
33
+
public fun scheduleResumeAfterDelay (JLkotlinx/coroutines/CancellableContinuation;)V
34
+
public fun toString ()Ljava/lang/String;
35
+
}
36
+
37
+
public final class kotlinx/coroutines/test/TestCoroutineExceptionHandler : kotlin/coroutines/AbstractCoroutineContextElement, kotlinx/coroutines/CoroutineExceptionHandler, kotlinx/coroutines/test/UncaughtExceptionCaptor {
38
+
public fun <init> ()V
39
+
public fun cleanupTestCoroutines ()V
40
+
public fun getUncaughtExceptions ()Ljava/util/List;
41
+
public fun handleException (Lkotlin/coroutines/CoroutineContext;Ljava/lang/Throwable;)V
42
+
}
43
+
44
+
public abstract interface class kotlinx/coroutines/test/TestCoroutineScope : kotlinx/coroutines/CoroutineScope, kotlinx/coroutines/test/DelayController, kotlinx/coroutines/test/UncaughtExceptionCaptor {
45
+
public abstract fun cleanupTestCoroutines ()V
46
+
}
47
+
48
+
public final class kotlinx/coroutines/test/TestCoroutineScopeKt {
49
+
public static final fun TestCoroutineScope (Lkotlin/coroutines/CoroutineContext;)Lkotlinx/coroutines/test/TestCoroutineScope;
50
+
public static synthetic fun TestCoroutineScope$default (Lkotlin/coroutines/CoroutineContext;ILjava/lang/Object;)Lkotlinx/coroutines/test/TestCoroutineScope;
51
+
}
52
+
1
53
public final class kotlinx/coroutines/test/TestDispatchers {
2
54
public static final fun resetMain (Lkotlinx/coroutines/Dispatchers;)V
3
55
public static final fun setMain (Lkotlinx/coroutines/Dispatchers;Lkotlinx/coroutines/CoroutineDispatcher;)V
4
56
}
5
57
58
+
public abstract interface class kotlinx/coroutines/test/UncaughtExceptionCaptor {
59
+
public abstract fun cleanupTestCoroutines ()V
60
+
public abstract fun getUncaughtExceptions ()Ljava/util/List;
61
+
}
62
+
63
+
public final class kotlinx/coroutines/test/UncompletedCoroutinesError : java/lang/AssertionError {
64
+
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
65
+
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
0 commit comments