Skip to content

Version 1.7.0-Beta #3667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 111 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
845e322
Update Kotlin to 1.7.10 (#3324)
qwwdfsad Jul 14, 2022
19666ac
Use Platform.getAvailableProcessors for K/N Dispatchers.Default (#3366)
qwwdfsad Jul 14, 2022
3e7873f
Reduce unnecessary @PublishedApi surface of UnbiasedSelectBuilderImpl…
qwwdfsad Jul 25, 2022
007b5a5
Mark context in DiagnosticCoroutineContextException as transient (#3370)
qwwdfsad Jul 26, 2022
5c582ee
Get rid of the old Kotlin/Native memory model (#3376)
qwwdfsad Jul 27, 2022
3120530
Introduce Job.parent API (#3384)
qwwdfsad Jul 29, 2022
371e4f3
Introduce a rendezvous on CancellableContinuationImpl.parentHandle to…
qwwdfsad Aug 2, 2022
521ee78
Update Kover to 0.6.0-Beta (#3386)
qwwdfsad Aug 4, 2022
9e886f1
Update select-guide timings to be precise (#3387)
qwwdfsad Aug 4, 2022
feea6a5
New `select` and `Mutex` implementations (#3020)
ndkoval Aug 4, 2022
03176c7
Recover proper coverage filtering and add few more tests for legacy s…
qwwdfsad Aug 4, 2022
a78dd11
Introduce Java Object Layout to the codebase and write tests for core…
qwwdfsad Aug 4, 2022
7d8e275
Merge branch 'master' into develop
qwwdfsad Sep 5, 2022
73f780c
Fix cancelled delayed jobs not being disposed of in TestDispatcher (#…
dkhalanskyjb Sep 8, 2022
03e6a74
Properly cancel handles returned by setTimeout in JS dispatchers (#3440)
qwwdfsad Sep 8, 2022
9e1eb9e
Update wording in shared-mutable-state-and-concurrency.md
qwwdfsad Sep 8, 2022
4a44fef
Fix another potential memory leak in WorkerDispatcher (#3445)
dkhalanskyjb Sep 8, 2022
4e97c83
Get rid of workaround for KT-16222 that is long time fixed (#3446)
qwwdfsad Sep 9, 2022
1fc01e7
Replace hand-rolled ArrayQueue with ArrayDeque in standard library in…
qwwdfsad Sep 9, 2022
df9421a
Update delay and withTimeout* documentation (#3451)
qwwdfsad Sep 13, 2022
3327273
Update Dispatchers.Main documentation (#3450)
qwwdfsad Sep 13, 2022
5322c8d
Ensure awaitFrame() only awaits a single frame when used from the mai…
qwwdfsad Sep 16, 2022
7f557e9
Preparation for atomicfu JVM IR plugin application in 1.7.20 (#3455)
mvicsokolova Sep 20, 2022
61ba10d
Introduce non-nullable types in reactive integrations where appropria…
qwwdfsad Sep 20, 2022
bb16214
Remove Class-Path attribute from debug JAR (#3402)
qwwdfsad Sep 27, 2022
4a5892f
Properly use UndispatchedCoroutine context for context-specific eleme…
qwwdfsad Sep 27, 2022
dc58806
Allow customization of default scheduler name on JVM (#3465)
IgnatBeresnev Sep 28, 2022
85a2601
Add parametrized Flow#filterIsInstance extension (#3464)
IgnatBeresnev Sep 28, 2022
4f1d41f
Adjust Gradle configuration and introduce allWarningsAsErrors (#3466)
qwwdfsad Sep 28, 2022
935faf7
Use outputFileProperty instead of outputFile (#3460)
ilgonmic Oct 5, 2022
cefd9c0
Update Kover version to 0.6.1 (#3471)
qwwdfsad Oct 5, 2022
d2503c0
Add timeout operator to Flow as @FlowPreview (#3148)
pablobaxter Oct 5, 2022
f77f6dd
Make use of `CompletionStage#handle` instead of `whenComplete` (#3475)
He-Pin Oct 11, 2022
27396e7
Fix flakiness of TimeoutTest (#3477)
qwwdfsad Oct 11, 2022
150f185
Update Kotlin to 1.7.20 (#3478)
qwwdfsad Oct 12, 2022
298eb11
New implementation of K/N multi-threaded dispatchers (#3421)
qwwdfsad Oct 12, 2022
1656a0d
Get rid of real time in TimeoutTest
qwwdfsad Oct 12, 2022
f3527c9
Merge kotlinx-coroutines-core and kotlinx-coroutines-jdk8 modules (#3…
qwwdfsad Oct 12, 2022
92a2495
Make Mono.awaitSingleOrNull wait for onComplete() (#3489)
dkhalanskyjb Oct 19, 2022
8947818
Integration test step in Train (#3486)
mvicsokolova Oct 20, 2022
449b7a0
docs: fix link in immediate documentation (#3491)
francescotescari Oct 20, 2022
0bb8ee8
Display artificial stack frames as calls to functions instead of text…
dkhalanskyjb Oct 20, 2022
8724e63
Update binary compatibility validator to 0.12.0 (#3496)
qwwdfsad Oct 21, 2022
02bf356
Add overloads for runTest that accept a Duration (#3483)
hfhbd Oct 21, 2022
4a13d58
Apply "configure-compilation-conventions" script earlier (#3488)
mvicsokolova Oct 25, 2022
bfc6c0b
Deprecate SharedFlow.toList(dst) and toSet(dst) (#3500)
dkhalanskyjb Oct 25, 2022
06b3b3b
Publish empty kotlinx-coroutines-jdk8 artifact (#3510)
qwwdfsad Oct 31, 2022
6c9d358
Remove some broken tests (#3513)
dkhalanskyjb Oct 31, 2022
4e29357
Disable tests with real source of the time on Java's Windows to preve…
qwwdfsad Nov 3, 2022
30e905c
Update atomicfu to 0.18.5 (#3501)
mvicsokolova Nov 15, 2022
9ae476f
Stabilize isClosedForSend and isClosedForReceive (#3517)
qwwdfsad Nov 16, 2022
c87589d
Fix Java targetCompatibility was not configured in kotlinx-coroutines…
Tapchicoma Nov 21, 2022
287d038
Fix coroutines dump tests (#3524)
anti-social Nov 21, 2022
54cf4fc
Merge pull request #3535 from Kotlin/kotlin-1.8.0/fix-jvm-target
woainikk Nov 22, 2022
4e25853
Remove no longer relevant third-party license file that was added as …
qwwdfsad Nov 22, 2022
cb0b51e
Update Kotlin to 1.8.0-Beta (#3549)
qwwdfsad Dec 7, 2022
ccde0c7
Fix a suppressed warning
dkhalanskyjb Dec 13, 2022
184d395
Mention value-based conflation in MutableStateFlow (#3539)
qwwdfsad Dec 27, 2022
7205177
Update JMH (#3531)
qwwdfsad Dec 27, 2022
28d98e8
Chore(infra): Prepare coroutines for including to the community proje…
stasjas Dec 9, 2022
c194877
Make EventLoopImplBase properly synchronized on Kotlin/Native (#3550)
qwwdfsad Dec 27, 2022
8eb8e68
Merge pull request #3559 from Kotlin/kotlin-community/dev
stasjas Dec 28, 2022
f4c5725
Merge branch 'master' into develop
qwwdfsad Jan 2, 2023
b74e039
Eliminate unneeded `LimitedDispatcher` instances on `Dispatchers.Defa…
dovchinnikov Jan 2, 2023
0eb94dd
Update atomicfu to 0.19.0 (#3570)
mvicsokolova Jan 3, 2023
e6ddc81
Remove unused internal function (#3573)
qwwdfsad Jan 3, 2023
67e21b2
Fix flaky SharingReferenceTest the same way it was addressed in #2709…
qwwdfsad Jan 5, 2023
c3b7b20
Promote @FlowPreview API to stable/experimental (#3548)
qwwdfsad Jan 13, 2023
ebff885
Make scan and runningFold documentation example consistent with other…
qwwdfsad Jan 16, 2023
87d1af9
Introduce a separate slot for stealing tasks into in CoroutineSchedul…
qwwdfsad Jan 16, 2023
4102f90
Increment WorkQueue.blockingTasksInBuffer only after capacity check (…
qwwdfsad Jan 16, 2023
71125e3
Do not propagate exceptions to CoroutineExceptionHandler in 'future' …
qwwdfsad Jan 16, 2023
eb21974
Prevent `runBlocking` failure when the Worker it runs on terminates (…
dkhalanskyjb Jan 17, 2023
6a6e62d
Remove obsolete and misleading line from the documentation (#3590)
qwwdfsad Jan 19, 2023
79d885f
Remove ThreadLocal from ThreadLocalMap when finishing UndispatchedCor…
qwwdfsad Jan 24, 2023
eac0b07
KotlinxTrain: add mavenLocal repo (#3599)
woainikk Jan 25, 2023
cca82e7
Improve DebugProbes performance (#3534)
qwwdfsad Feb 1, 2023
33220fc
Remove docs about Dispatchers.kt that replicate the common code (#3614)
dkhalanskyjb Feb 2, 2023
32af157
Fix suspend-resume race in DebugProbes (#3514)
qwwdfsad Feb 2, 2023
e946cd7
Don't allocate threads on every dispatch in Native's thread pools (#3…
dkhalanskyjb Feb 13, 2023
e7cf632
Introduce fast and scalable channels (#3103)
ndkoval Feb 13, 2023
54c3108
NonConcurrentlyModifiable concurrency failures should identify both p…
mcumings Feb 13, 2023
f538af6
Workaround for debugger+compiler crash (#3625)
qwwdfsad Feb 14, 2023
b6e1839
Explain the test framework behavior in the withTimeout message (#3623)
dkhalanskyjb Feb 14, 2023
8c4ff51
Preserve mutex invariant: throw ISE when incorrect access with owner …
qwwdfsad Feb 14, 2023
fc6c811
Remove dead-code in the LockFreeLinkedList implementation after new c…
qwwdfsad Feb 14, 2023
36065e6
Restore TCO in BufferedChannel (#3627)
qwwdfsad Feb 14, 2023
dc19e1f
Update Kotlin to 1.8.10 (#3628)
qwwdfsad Feb 15, 2023
7f4b80c
Add explicit module-info.java for JPMS compatibility (#3629)
qwwdfsad Feb 21, 2023
3b22c27
Allow specifying the timeout for `runTest` (#3603)
dkhalanskyjb Feb 21, 2023
c5f73ba
Update atomicfu to 0.20.0
mvicsokolova Feb 21, 2023
7014961
Update the documentation for runTest (#3632)
dkhalanskyjb Feb 22, 2023
bf03c48
Remove some ExperimentalCoroutinesApi markers in the test module (#3622)
dkhalanskyjb Feb 22, 2023
1ed19c8
Introduce first version of Dispatchers.IO for K/N (#3576)
qwwdfsad Feb 22, 2023
747db9e
Change the contract of CoroutineContext.isActive to return 'true' for…
qwwdfsad Feb 23, 2023
1245d7e
Attempt to report uncaught exceptions in the test module (#3449)
dkhalanskyjb Feb 24, 2023
c176901
TestTimeSource: Expose comparable timemarks (#3617)
hfhbd Feb 3, 2023
4ce3536
Remove duplicated 'be' from Deferred kdoc (#3644)
tommus Feb 26, 2023
2b865e2
Update K/N targets in accordance with official recommendations (#3640)
qwwdfsad Feb 27, 2023
cb0ef71
Update the README of the test module to reflect the developments (#3645)
dkhalanskyjb Feb 27, 2023
2da6817
Optimize `CancellableContinuationImpl.invokeOnCancellation(..)` for `…
ndkoval Feb 28, 2023
bc9850e
Deprecate BroadcastChannel and the corresponding API (#3647)
qwwdfsad Mar 3, 2023
2a05088
Promote deprecation levels for 1.7.0 (#3637)
qwwdfsad Mar 3, 2023
b8d2794
Promote the test module deprecation levels for 1.7.0 (#3655)
dkhalanskyjb Mar 3, 2023
46765ed
Release reusability token when suspendCancellableCoroutineReusable's …
qwwdfsad Mar 3, 2023
1b414a9
Properly support atomicfu in JPMS (#3656)
qwwdfsad Mar 3, 2023
bddfb89
Introduce internal API to run the current work queue of the system di…
qwwdfsad Mar 3, 2023
2032033
Fix a broken test (#3659)
dkhalanskyjb Mar 6, 2023
24d5fee
Merge branch 'master' into develop
qwwdfsad Mar 6, 2023
9e7c38d
Update Dokka to 1.8.10 (#3661)
IgnatBeresnev Mar 6, 2023
a3060c6
Version 1.7.0-Beta
qwwdfsad Mar 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ build
out
target
local.properties
benchmarks.jar
/kotlin-js-store
5 changes: 5 additions & 0 deletions .idea/dictionaries/shared.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# Change log for kotlinx.coroutines

## Version 1.7.0-Beta

### Core API significant improvements

* New `Channel` implementation with significant performance improvements across the API (#3621).
* New `select` operator implementation: faster, more lightweight, and more robust (#3020).
* `Mutex` and `Semaphore` now share the same underlying data structure (#3020).
* `Dispatchers.IO` is added to K/N (#3205)
* `newFixedThreadPool` and `Dispatchers.Default` implementations on K/N were wholly rewritten to support graceful growth under load (#3595).
* `kotlinx-coroutines-test` rework:
- Add the `timeout` parameter to `runTest` for the whole-test timeout, 10 seconds by default (#3270). This replaces the configuration of quiescence timeouts, which is now deprecated (#3603).
- The `withTimeout` exception messages indicate if the timeout used the virtual time (#3588).
- `TestCoroutineScheduler`, `runTest`, and `TestScope` API are promoted to stable (#3622).
- `runTest` now also fails if there were uncaught exceptions in coroutines not inherited from the test coroutine (#1205).

### Breaking changes

* Old K/N memory model is no longer supported (#3375).
* New generic upper bounds were added to reactive integration API where the language since 1.8.0 dictates (#3393).
* `kotlinx-coroutines-core` and `kotlinx-coroutines-jdk8` artifacts were merged into a single artifact (#3268).
* Artificial stackframes in stacktrace recovery no longer contain the `\b` symbol and are now navigable in IDE and supplied with proper documentation (#2291).
* `CoroutineContext.isActive` returns `true` for contexts without any job in them (#3300).

### Bug fixes and improvements

* Kotlin version is updated to 1.8.10.
* JPMS is supported (#2237). Thanks @lion7!
* `BroadcastChannel` and all the corresponding API are deprecated (#2680).
* Added all supported K/N targets (#3601, #812, #855).
* K/N `Dispatchers.Default` is backed by the number of threads equal to the number of available cores (#3366).
* Fixed an issue where some coroutines' internal exceptions were not properly serializable (#3328).
* Introduced `Job.parent` API (#3201).
* Fixed a bug when `TestScheduler` leaked cancelled jobs (#3398).
* `TestScope.timeSource` now provides comparable time marks (#3617). Thanks @hfhbd!
* Fixed an issue when cancelled `withTimeout` handles were preserved in JS runtime (#3440).
* Ensure `awaitFrame` only awaits a single frame when used from the main looper (#3432). Thanks @pablobaxter!
* Obsolete `Class-Path` attribute was removed from `kotlinx-coroutines-debug.jar` manifest (#3361).
* Fixed a bug when `updateThreadContext` operated on the parent context (#3411).
* Added new `Flow.filterIsInstance` extension (#3240).
* `Dispatchers.Default` thread name prefixes are now configurable with system property (#3231).
* Added `Flow.timeout` operator as `@FlowPreview` (#2624). Thanks @pablobaxter!
* Improved the performance of the `future` builder in case of exceptions (#3475). Thanks @He-Pin!
* `Mono.awaitSingleOrNull` now waits for the `onComplete` signal (#3487).
* `Channel.isClosedForSend` and `Channel.isClosedForReceive` are promoted from experimental to delicate (#3448).
* Fixed a data race in native `EventLoop` (#3547).
* `Dispatchers.IO.limitedParallelism(valueLargerThanIOSize)` no longer creates an additional wrapper (#3442). Thanks @dovchinnikov!
* Various `@FlowPreview` and `@ExperimentalCoroutinesApi` are promoted to experimental and stable respectively (#3542, #3097, #3548).
* Performance improvements in `Dispatchers.Default` and `Dispatchers.IO` (#3416, #3418).
* Fixed a bug when internal `suspendCancellableCoroutineReusable` might have hanged (#3613).
* Introduced internal API to process events in the current system dispatcher (#3439).
* Global `CoroutineExceptionHandler` is no longer invoked in case of unprocessed `future` failure (#3452).
* Performance improvements and reduced thread-local pressure for the `withContext` operator (#3592).
* Improved performance of `DebugProbes` (#3527).
* Fixed a bug when the coroutine debugger might have detected the state of a coroutine incorrectly (#3193).
* Various documentation improvements and fixes.

## Version 1.6.4

* Added `TestScope.backgroundScope` for launching coroutines that perform work in the background and need to be cancelled at the end of the test (#3287).
Expand Down
34 changes: 16 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
[![Kotlin Stable](https://kotl.in/badges/stable.svg)](https://kotlinlang.org/docs/components-stability.html)
[![JetBrains official project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
[![Download](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.4)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.4/pom)
[![Kotlin](https://img.shields.io/badge/kotlin-1.6.21-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Download](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.7.0-Beta)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.7.0-Beta/pom)
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.10-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Slack channel](https://img.shields.io/badge/chat-slack-green.svg?logo=slack)](https://kotlinlang.slack.com/messages/coroutines/)

Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
This is a companion version for the Kotlin `1.6.21` release.
This is a companion version for the Kotlin `1.8.10` release.

```kotlin
suspend fun main() = coroutineScope {
Expand Down Expand Up @@ -37,6 +37,7 @@ suspend fun main() = coroutineScope {
* [core/jvm](kotlinx-coroutines-core/jvm/) — additional core features available on Kotlin/JVM:
* [Dispatchers.IO] dispatcher for blocking coroutines;
* [Executor.asCoroutineDispatcher][asCoroutineDispatcher] extension, custom thread pools, and more.
* Integrations with `CompletableFuture` and JVM-specific extensions.
* [core/js](kotlinx-coroutines-core/js/) — additional core features available on Kotlin/JS:
* Integration with `Promise` via [Promise.await] and [promise] builder;
* Integration with `Window` via [Window.asCoroutineDispatcher], etc.
Expand All @@ -56,7 +57,7 @@ suspend fun main() = coroutineScope {
* [ui](ui/README.md) — modules that provide coroutine dispatchers for various single-threaded UI libraries:
* Android, JavaFX, and Swing.
* [integration](integration/README.md) — modules that provide integration with various asynchronous callback- and future-based libraries:
* JDK8 [CompletionStage.await], Guava [ListenableFuture.await], and Google Play Services [Task.await];
* Guava [ListenableFuture.await], and Google Play Services [Task.await];
* SLF4J MDC integration via [MDCContext].

## Documentation
Expand Down Expand Up @@ -84,15 +85,15 @@ Add dependencies (you can also add other modules that you need):
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
<version>1.6.4</version>
<version>1.7.0-Beta</version>
</dependency>
```

And make sure that you use the latest Kotlin version:

```xml
<properties>
<kotlin.version>1.6.21</kotlin.version>
<kotlin.version>1.8.10</kotlin.version>
</properties>
```

Expand All @@ -102,7 +103,7 @@ Add dependencies (you can also add other modules that you need):

```kotlin
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0-Beta")
}
```

Expand All @@ -111,10 +112,10 @@ And make sure that you use the latest Kotlin version:
```kotlin
plugins {
// For build.gradle.kts (Kotlin DSL)
kotlin("jvm") version "1.6.21"
kotlin("jvm") version "1.8.10"

// For build.gradle (Groovy DSL)
id "org.jetbrains.kotlin.jvm" version "1.6.21"
id "org.jetbrains.kotlin.jvm" version "1.8.10"
}
```

Expand All @@ -132,7 +133,7 @@ Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
module as a dependency when using `kotlinx.coroutines` on Android:

```kotlin
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.0-Beta")
```

This gives you access to the Android [Dispatchers.Main]
Expand Down Expand Up @@ -167,7 +168,7 @@ In common code that should get compiled for different platforms, you can add a d
```kotlin
commonMain {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0-Beta")
}
}
```
Expand All @@ -179,15 +180,15 @@ Platform-specific dependencies are recommended to be used only for non-multiplat
#### JS

Kotlin/JS version of `kotlinx.coroutines` is published as
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.6.4/jar)
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.7.0-Beta/jar)
(follow the link to get the dependency declaration snippet) and as [`kotlinx-coroutines-core`](https://www.npmjs.com/package/kotlinx-coroutines-core) NPM package.

#### Native

Kotlin/Native version of `kotlinx.coroutines` is published as
[`kotlinx-coroutines-core-$platform`](https://mvnrepository.com/search?q=kotlinx-coroutines-core-) where `$platform` is
the target Kotlin/Native platform. [List of currently supported targets](https://github.com/Kotlin/kotlinx.coroutines/blob/master/gradle/compile-native-multiplatform.gradle#L16).

the target Kotlin/Native platform.
Targets are provided in accordance with [official K/N target support](https://kotlinlang.org/docs/native-target-support.html).
## Building and Contributing

See [Contributing Guidelines](CONTRIBUTING.md).
Expand All @@ -211,7 +212,7 @@ See [Contributing Guidelines](CONTRIBUTING.md).
[MainScope()]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-main-scope.html
[SupervisorJob()]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-supervisor-job.html
[CoroutineExceptionHandler]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-exception-handler/index.html
[Dispatchers.IO]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html
[Dispatchers.IO]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-i-o.html
[asCoroutineDispatcher]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/as-coroutine-dispatcher.html
[Promise.await]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/await.html
[promise]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/promise.html
Expand Down Expand Up @@ -259,9 +260,6 @@ See [Contributing Guidelines](CONTRIBUTING.md).

<!--- MODULE kotlinx-coroutines-jdk8 -->
<!--- INDEX kotlinx.coroutines.future -->

[CompletionStage.await]: https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-jdk8/kotlinx.coroutines.future/await.html

<!--- MODULE kotlinx-coroutines-guava -->
<!--- INDEX kotlinx.coroutines.guava -->

Expand Down
25 changes: 6 additions & 19 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

@file:Suppress("UnstableApiUsage")

import me.champeau.gradle.*
import me.champeau.jmh.*
import org.jetbrains.kotlin.gradle.tasks.*

plugins {
id("com.github.johnrengelman.shadow")
id("me.champeau.gradle.jmh") apply false
id("me.champeau.jmh")
}

repositories {
Expand All @@ -21,33 +21,19 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8
}

apply(plugin="me.champeau.gradle.jmh")

tasks.named<KotlinCompile>("compileJmhKotlin") {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += "-Xjvm-default=enable"
}
}

// It is better to use the following to run benchmarks, otherwise you may get unexpected errors:
// ./gradlew --no-daemon cleanJmhJar jmh -Pjmh="MyBenchmark"
extensions.configure<JMHPluginExtension>("jmh") {
jmhVersion = "1.26"
duplicateClassesStrategy = DuplicatesStrategy.INCLUDE
failOnError = true
resultFormat = "CSV"
project.findProperty("jmh")?.also {
include = listOf(".*$it.*")
}
// includeTests = false
}

val jmhJarTask = tasks.named<Jar>("jmhJar") {
archiveBaseName by "benchmarks"
archiveClassifier by null
archiveVersion by null
destinationDirectory.file("$rootDir")
archiveVersion.convention(null as String?)
destinationDirectory.set(file("$rootDir"))
}

tasks {
Expand All @@ -63,13 +49,14 @@ tasks {
}

dependencies {
implementation("org.openjdk.jmh:jmh-core:1.26")
implementation("org.openjdk.jmh:jmh-core:1.35")
implementation("io.projectreactor:reactor-core:${version("reactor")}")
implementation("io.reactivex.rxjava2:rxjava:2.1.9")
implementation("com.github.akarnokd:rxjava2-extensions:0.20.8")

implementation("com.typesafe.akka:akka-actor_2.12:2.5.0")
implementation(project(":kotlinx-coroutines-core"))
implementation(project(":kotlinx-coroutines-debug"))
implementation(project(":kotlinx-coroutines-reactive"))

// add jmh dependency on main
Expand Down
Loading