-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add the contract to runBlocking for shared JVM/Native code #4368
base: develop
Are you sure you want to change the base?
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:
|
Additionally, on Native, make thread keepalive checks a bit more efficient.
c038e59
to
088f61f
Compare
|
0970c29
to
57254ab
Compare
57254ab
to
2d9d4ac
Compare
Depending on the Java version, JOL from |
}); | ||
} catch (InterruptedException e) { | ||
} | ||
assert entered; |
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.
Consider using JUnit's assertFoo
functions. Java's assert
s can be disabled (or, to be more precise, can be not enabled). Especially for our custom Gradle setup, the simpler the thing -- the better
@@ -30,6 +30,11 @@ public final class kotlinx/coroutines/BuildersKt { | |||
public static final fun withContext (Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | |||
} | |||
|
|||
public final class kotlinx/coroutines/Builders_concurrentKt { |
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.
I would assume that it's possible to workaround the need for that middle layer by adding
@file:JvmMultifileClass
@file:JvmName("BuildersKt")
to Builders.concurrent.kt
. Could you please consider doing so?
Additionally, on Native, make thread keepalive checks a bit more efficient.