-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add the contract to runBlocking for shared JVM/Native code #4368
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
Conversation
7 tests failed on the CI. Usually, that's pretty conclusive, but I fail to reproduce any of the failures on my machine. What's especially mysterious is that the tests failed on the JVM, where I don't think I did anything but 1) refactor the code somewhat and 2) remove the |
I couldn't reproduce the issue locally after running a clean build in a loop for six hours (after which the Gradle daemon failed with an OOM, which is fun, but probably unrelated). Restarting the build on the CI, I don't observe the failure for the second time. Still, please review this especially carefully, because something did go wrong, and I have no idea what did. The failures:
|
c038e59
to
088f61f
Compare
|
0970c29
to
57254ab
Compare
57254ab
to
2d9d4ac
Compare
Depending on the Java version, JOL from |
integration-testing/src/javaConsumersTest/java/RunBlockingJavaTest.java
Outdated
Show resolved
Hide resolved
1b32eb0
to
b4bd1fe
Compare
*/ | ||
public expect fun <T> runBlocking(context: CoroutineContext = EmptyCoroutineContext, block: suspend CoroutineScope.() -> T): T | ||
@OptIn(ExperimentalContracts::class) | ||
@JvmName("runBlockingForKotlinOnly") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be weird to observe that in one's traces
@JvmName("runBlockingForKotlinOnly") | |
@JvmName("runBlockingK") |
Additionally, on Native, make thread keepalive checks a bit more efficient.
2656a9b
to
2b1dca9
Compare
Additionally, on Native, make thread keepalive checks a bit more efficient.