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
Breaking: Get rid of atomic cancellation and provide a replacement #1937
Commits on Sep 16, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 074ea3d - Browse repository at this point
Copy the full SHA 074ea3dView commit details -
Remove atomic cancellation support
This is a problematic for Android when Main dispatcher is cancelled on destroyed activity. Atomic nature of channels is designed to prevent loss of elements, which is really not an issue for a typical application, but creates problem when used with channels. * Internal suspendAtomicCancellableCoroutine -> suspendCancellableCoroutine * Internal suspendAtomicCancellableCoroutineReusable -> suspendCancellableCoroutineReusable * Remove atomic cancellation from docs * Ensures that flowOn does not resume downstream after cancellation. * MODE_ATOMIC_DEFAULT renamed into MODE_ATOMIC * Introduced MODE_CANCELLABLE_REUSABLE to track suspendCancellableCoroutineReusable * Better documentation for MODE_XXX constants. * Added stress test for proper handling of MODE_CANCELLABLE_REUSABLE and fixed test for #1123 bug with job.join (working in MODE_CANCELLABLE) that was not properly failing in the absence of the proper code in CancellableContinuationImpl.getResult * Added test for Flow.combine that should be fixed * Support extended invokeOnCancellation contract * Introduced internal tryResumeAtomic Fixes #1265 Fixes #1813 Fixes #1915
Configuration menu - View commit details
-
Copy full SHA for e68cb3b - Browse repository at this point
Copy the full SHA e68cb3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 46238a6 - Browse repository at this point
Copy the full SHA 46238a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5281798 - Browse repository at this point
Copy the full SHA 5281798View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3228b92 - Browse repository at this point
Copy the full SHA 3228b92View commit details -
Configuration menu - View commit details
-
Copy full SHA for 340e411 - Browse repository at this point
Copy the full SHA 340e411View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e1ecd8 - Browse repository at this point
Copy the full SHA 5e1ecd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 25b7727 - Browse repository at this point
Copy the full SHA 25b7727View commit details -
Configuration menu - View commit details
-
Copy full SHA for f91919d - Browse repository at this point
Copy the full SHA f91919dView commit details
Commits on Sep 17, 2020
-
Update kotlinx-coroutines-core/common/test/CancellableResumeTest.kt
Co-authored-by: Louis CAD <louis.cognault@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 356c88c - Browse repository at this point
Copy the full SHA 356c88cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 073c5f3 - Browse repository at this point
Copy the full SHA 073c5f3View commit details
Commits on Sep 18, 2020
-
Configuration menu - View commit details
-
Copy full SHA for cbc2f8b - Browse repository at this point
Copy the full SHA cbc2f8bView commit details
Commits on Sep 24, 2020
-
Removed extra CompletedContinuation allocations with channels send/receive
Configuration menu - View commit details
-
Copy full SHA for 7fac3b7 - Browse repository at this point
Copy the full SHA 7fac3b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d94759b - Browse repository at this point
Copy the full SHA d94759bView commit details
Commits on Sep 29, 2020
-
Configuration menu - View commit details
-
Copy full SHA for d6986ef - Browse repository at this point
Copy the full SHA d6986efView commit details -
Configuration menu - View commit details
-
Copy full SHA for a2339f2 - Browse repository at this point
Copy the full SHA a2339f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d3cee9 - Browse repository at this point
Copy the full SHA 5d3cee9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 76792fa - Browse repository at this point
Copy the full SHA 76792faView commit details -
~ Fixed refs to suspendAtomicCancellableCoroutineReusable in docs
Changed to suspendCancellableCoroutineReusable
Configuration menu - View commit details
-
Copy full SHA for c6aba6c - Browse repository at this point
Copy the full SHA c6aba6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 077b0e0 - Browse repository at this point
Copy the full SHA 077b0e0View commit details -
~ onElementCancel -> onUndeliveredElement
* Consistent type-alias use. * Rewrote docs to used "element delivery" concept.
Configuration menu - View commit details
-
Copy full SHA for 9cfcb11 - Browse repository at this point
Copy the full SHA 9cfcb11View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9c6ee3 - Browse repository at this point
Copy the full SHA e9c6ee3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4674989 - Browse repository at this point
Copy the full SHA 4674989View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b8778e - Browse repository at this point
Copy the full SHA 9b8778eView commit details -
Configuration menu - View commit details
-
Copy full SHA for aa926fa - Browse repository at this point
Copy the full SHA aa926faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fe569f - Browse repository at this point
Copy the full SHA 7fe569fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 38ec1d0 - Browse repository at this point
Copy the full SHA 38ec1d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a2ed60f - Browse repository at this point
Copy the full SHA a2ed60fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 08ce2f8 - Browse repository at this point
Copy the full SHA 08ce2f8View commit details -
~ Call onUndeliveredElement when channel is closed/cancelled
Also more docs and example for onUndeliveredElement usage
Configuration menu - View commit details
-
Copy full SHA for c6a07b2 - Browse repository at this point
Copy the full SHA c6a07b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for afe8cc3 - Browse repository at this point
Copy the full SHA afe8cc3View commit details
Commits on Sep 30, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 427117d - Browse repository at this point
Copy the full SHA 427117dView commit details
Commits on Oct 5, 2020
-
Update kotlinx-coroutines-core/common/src/channels/AbstractChannel.kt
Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b30d099 - Browse repository at this point
Copy the full SHA b30d099View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85b7812 - Browse repository at this point
Copy the full SHA 85b7812View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6535659 - Browse repository at this point
Copy the full SHA 6535659View commit details -
Configuration menu - View commit details
-
Copy full SHA for 500c911 - Browse repository at this point
Copy the full SHA 500c911View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2893470 - Browse repository at this point
Copy the full SHA 2893470View commit details -
Update kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt
Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4760c22 - Browse repository at this point
Copy the full SHA 4760c22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b79de8 - Browse repository at this point
Copy the full SHA 6b79de8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c88b832 - Browse repository at this point
Copy the full SHA c88b832View commit details -
~ Fixed bug in ChannelUndeliveredElementStressTest
* It must drain the channel before trying to verify. * A detailed analysis on failure is printed.
Configuration menu - View commit details
-
Copy full SHA for 4a7eb7a - Browse repository at this point
Copy the full SHA 4a7eb7aView commit details
Commits on Oct 6, 2020
-
~ Initialize DispatchedContinuation.resumeMode with MODE_UNINITIALIZED
This makes code cleaner, highlighting the fact that the actual resumeMode is always set when the continuation is being resumed. + added explicit test to ensure that a regular suspendCoroutine from stdlib resumes atomically and ignores cancellation.
Configuration menu - View commit details
-
Copy full SHA for 5bca7ca - Browse repository at this point
Copy the full SHA 5bca7caView commit details -
~ CancellableContinuationImpl.resetState -> resetStateReusable
Also, assert mode is MODE_CANCELLABLE_REUSABLE, don't update it.
Configuration menu - View commit details
-
Copy full SHA for 12bba52 - Browse repository at this point
Copy the full SHA 12bba52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3df38e9 - Browse repository at this point
Copy the full SHA 3df38e9View commit details
Commits on Oct 7, 2020
-
1
Configuration menu - View commit details
-
Copy full SHA for 164d3e5 - Browse repository at this point
Copy the full SHA 164d3e5View commit details
Commits on Oct 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 4361158 - Browse repository at this point
Copy the full SHA 4361158View commit details