-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Version 1.2.0-alpha #1057
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
Version 1.2.0-alpha #1057
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Migration to a new multiplatform plugin * kotlinx-coroutines-core-[common|js|native] are merged into one core module with multiple source sets * Folder structure and readme are restructured * Publication process is patched to preserve backward compatibility with artifact names
…to avoid DispatchException when initCause throws Fixes #933
* Introduce CopyableThrowable to provide a mechanism for flexible exception cloning * Do not reflectively clone exceptions with additional non-static fields
…very. Not included in a guide intentionally
Rationale: While it is possible to atomically transition state machine to "completed", it has multiple caveats: * It breaks intuition that "close" allows actors to process remaining messages and call its body * It introduces one more internal API dependency * It makes behaviour of non-lazy and lazy actors inconsistent Fixes #939
CompletableJob support added Fixes #607
The code is also refactored a bit to avoid repetition and long lines Fixes #987
And also make sure only the first detected error gets reported
# Conflicts: # kotlinx-coroutines-core/common/src/Job.kt
…ror to better reflect its semantics
…m implements it properly while others always use provided default value.
…Pie runtime ensures that uncaught exception is always logged Fixes #822
Add ThreadLocal.isPresent and ThreadLocal.ensurePresent methods Fixes #1028
* Rename jobOrNull to job * Replace coroutine with its context * Add check-and-act on isInstalled flag into synchronized blocks in order to avoid spurious memory leaks during uninstall * Replace WeakHashMap with Set to simplify debug probes
# Conflicts: # kotlinx-coroutines-core/common/src/Timeout.kt
Improve stacktrace merge heuristic: skip state machine meaningless fr…
* JobSupport.handleJobException (which is called before the coroutine goes to the final state) is now called only when parent did not handle exception and is used only in launch-like coroutines (launch and actor) to report uncaught exception. * The final result of other types coroutines that, by default, have an object "to store exceptions" is consistently processed after all other notifications when the coroutine state is already complete and is reported as uncaught exception as a last-resort processing tactic when it cannot be otherwise handled. * The above change makes the order of notifications for future { ... } and other async-like coroutine builders consistent with the order in which async { ... }.await() is notified. * The "handled" state of exception (whether it was processed or not) is now stored in CompletedExceptionally marker class (pulled this field up from CancelledContinuation). * AbstractCoroutine.onCompletedExceptionally is renamed to onCancelled and includes "handled" flag. * protected val JobSupport.completionCauseHandled is introduced to access "handled" flag, which simplified reactive streams integration. * "suppressed" flag is dropped from JobSupport.onCompletionInternal. * Fixed exception processing in reactive integrations -- exception that is thrown from a cancelled (disposed) coroutine is not lost anymore.
* JobSupport.onCompletionInternal(onCompleted/onCancelled) is now invoked before all the user-installed listeners with is consistent with how the onCancelling/invokeOnCancelling(onCancelling=true) works. * Now all the state processing (updating the future, reporting unhandled exception, etc) in onCompletionInternal happens before observers that .join/.wait the coroutine are resumed and even before the state is set to final (to avoid exception handing races) with the exception of fast-path successful completion of coroutine. * JobSupport.afterCompletionInternal is introduced. It is invoked after all use-installed listeners and that is where scoped coroutines resume the rest of the code. * Remove empty AbstractCoroutine.onCancellation, move docs to JobSupport * onCancellation renamed to onCancelling for consistency with invokeOnCompletion(onCancelling=true)
elizarov
approved these changes
Mar 25, 2019
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.
LGTM with minor grammatical changes.
a460256
to
d36fc16
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.