Skip to content

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 91 commits into from
Mar 26, 2019
Merged

Version 1.2.0-alpha #1057

merged 91 commits into from
Mar 26, 2019

Conversation

qwwdfsad
Copy link
Collaborator

No description provided.

elizarov and others added 30 commits December 22, 2018 16:38
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
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
elizarov and others added 23 commits March 6, 2019 18:58
And also make sure only the first detected error gets reported
# Conflicts:
#	kotlinx-coroutines-core/common/src/Job.kt
…ption instead of rethrowing it to provide faster feedback loop

Fixes #808
Fixes #773
…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)
@qwwdfsad qwwdfsad requested a review from elizarov March 25, 2019 16:39
@qwwdfsad qwwdfsad changed the title Version 1.2.0 alpha Version 1.2.0-alpha Mar 25, 2019
Copy link
Contributor

@elizarov elizarov left a 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.

@qwwdfsad qwwdfsad force-pushed the version-1.2.0-alpha branch from a460256 to d36fc16 Compare March 26, 2019 08:15
@qwwdfsad qwwdfsad merged commit 085a4cb into master Mar 26, 2019
@qwwdfsad qwwdfsad deleted the version-1.2.0-alpha branch April 25, 2019 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants