Skip to content
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

Version 1.3.6 #2001

Merged
merged 42 commits into from
May 8, 2020
Merged

Version 1.3.6 #2001

merged 42 commits into from
May 8, 2020

Conversation

qwwdfsad
Copy link
Collaborator

@qwwdfsad qwwdfsad commented May 8, 2020

No description provided.

elizarov and others added 30 commits March 18, 2020 12:10
The representation of not selected state is changed from _state === this to
_state === NOT_SELECTED (a special marker).
…1880)

During the change of the publication validator, a bug was
introduced that led to MavenPublicationValidator being run not on
the artifacts from the local Maven repository but on classfiles
from the corresponding subproject. This is a problem because this
test is for the behavior of the atomicfu plugin, which could in
theory produce nice classfiles in one place but wrong ones in the
other, and the only important thing to test is whether the
published classfiles are good.

Now, this is fixed.
* Fix DefaultExecutor not being able to exit.
* Also adds the performance optimization. See the discussion on the PR.
* Add a stress test for the DefaultExecutor worker shutting down.
* Make `testDelayChannelBackpressure2` not fail:

This test could in theory already fail on the second
`checkNotEmpty`: after the first `checkNotEmpty` has passed,
first, the ticker channel awakens to produce a new element, and
then the main thread awakens to check if it's there. However, if
the ticker channel is sufficiently slowed down, it may not produce
the element in time for the main thread to find it.

After introducing the change that allows the worker thread in
`DefaultExecutor` to shut down, the initial delay of 2500 ms is
sufficient for the worker to shut down (which, by default, happens
after 1000 ms of inactivity), and then the aforementioned race
condition worsens: additional time is required to launch a new
worker thread and it's much easier to miss the deadline.

Now, the delays are much shorter, meaning that the worker thread is
never inactive long enough to shut down.

Fixes #856
…1885)

When ArrayBroadcastChannel was closed it was still retaining a reference to its subscription (even if that subscription was cancelled) while, in fact, either closing a broadcast channel or cancelling subscription should remove the reference.

This is no problem with ConflatedBroadcastChannel, but it is added to the test for completeness.
* Update CoroutineScope docs
* Fixed scope examples in guides, added notes on first-party support in Android.
* Simplified scopes section in UI guide since it is mostly irrelevant.

Fixes #1581
* Integration with BlockHound
* Improve build configuration of integration tests
* publication-validator is renamed to integration-testing;
* Add an integration test for coroutine debugger java agent
* Use JNA-based attach mechanism for dynamic attach

Fixes #1821 
Fixes #1060

Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
Co-authored-by: Sergei Egorov <[email protected]>
* Introduce Flow.onEmpty operator

Fixes #1890
* Make the list of segments more abstract, so that it can be used for other synchronization and communication primitives

Co-authored-by: Roman Elizarov <[email protected]>
* Further clarifications and better style for exception handling
* Consistent terminology on "uncaught exceptions".
* Clarified special relations of exception handling with supervision.
* Clearer text in CoroutineExceptionHandler examples.
* Minor stylistic corrections.

Fixes #1746
Fixes #871

Co-Authored-By: EdwarDDay <[email protected]>
* Make semaphore implementation linearizable (ignoring extra suspensions)
* Make mutex implementation linearizable (ignoring extra suspensions)
* Add linearizability tests for mutex and semaphore
* Fix `SegmentQueueLCStressTest`

Fixes #1737

Co-authored-by: Roman Elizarov <[email protected]>
This is debug agent machinery rework in order to prepare for IDEA integration

    * Extract internal DebugProbesImpl to kotlinx-coroutines-core
    * Introduce AgentPremain that works without ByteBuddy to kotlinx-coroutines-core, so it now can be used as Java agent and all debug info can be extracted via reflection or JDWP
    * Reflective lookup of ByteBuddy attach to resolve cyclic dependency between core and debug modules
    * Reduce public API surface, introduce JDWP-specific API
    * Introduce a mechanism to produce a DebugProbesKt.bin and verify them against the golden value
…1732)

Flow.onCompletion now reports all failures and cancellation in its cause just like invokeOnCompletion. A null cause is reported if and only if flow had completed successfully (no failure, no cancellation). Emission of additional elements after the end of the flow is only possible from inside of onCompletion block in case of successful completion.

Also fixed a bug where onCompletion implementation was trying to add exception to its own list of suppressed exceptions, which is not allowed.

Fixes #1693
… integrate with APIs that may block the current thread, but react on cancellation (#1680)

Fixes #1671
* Remove experimental annotation from Flow terminal and Channel operators
* Remove experimental annotation from Flow count* and reduce* operators
* Remove experimental annotation from Flow operations, including buffer and flowOn
* Remove experimental annotation from combine and zip
This reverts commit 76e6440
qwwdfsad and others added 11 commits April 29, 2020 19:24
* Support thread interrupting blocking functions (#1947)

This is the implementation of issue #1947

Signed-off-by: Trol <[email protected]>
Co-authored-by: Trol <[email protected]>
* Kotlin DSL - 'android:example-app' (#1940)
* 'android:example-app'. Gradle 5.6.1 - sync with root project
* Kotlin DSL - 'android:example-app'
* Kotlin DSL - 'android:animation-app' (#1941)
* 'android:animation-app'. Gradle 5.6.1 - sync with root project
* Kotlin DSL - 'android:animation-app'
* Kotlin DSL - 'swing' (#1943)
* Kotlin DSL - 'integration:jdk8' (#1944)
* Kotlin DSL - 'test' (#1945)
* Kotlin DSL - 'reactive:reactive' (#1946)
* Kotlin DSL - 'android-unit-tests'
* Use relative paths
* Kotlin DSL - 'js-stub' (#1938) (#1959)
* Kotlin DSL - 'android' (#1938) (#1956)
* Kotlin DSL - 'stdlib-stubs' (#1938) (#1955)
* Kotlin DSL - 'site' (#1938) (#1954)
* Kotlin DSL - 'maven-central' (#1938) (#1953)
* Kotlin DSL - 'benchmarks' (#1938) (#1952)

Co-authored-by: Victor Turansky <[email protected]>
* Use standard random API
* Inline 'random' method
I've failed to write a reliable test here. See also #571

Fixes #1992
* Fix code formatting in doc example and make it more concise (both vertically and horizontally).
* Don't promote custom `withTimeout` logic in examples. Use the actual `withTimeout` function.
* Logical introduction of `context` parameter in docs (first use without it, then explain how it helps), consistent doc references.
* Improved implementation in various places:
  * runInterruptibleInExpectedContext does not have to be suspend
  * There is always Job in the context
  * ThreadState should not do complex init in constructor (that's bad style)
  * ThreadState does not need inner State class, atomic int is enough
  * Consistent project-wide variable naming: state -> _state
  * Consistent use of `error` function to throw IllegalStateException
Spell-check & subject/body separation inspection
StateFlow is a Flow analogue to ConflatedBroadcastChannel. Since Flow API
is simpler than channels APIs, the implementation of StateFlow is
simpler. It consumes and allocates less memory, while still providing
full deadlock-freedom (even though it is not lock-free internally).

Fixes #1973
Fixes #395
Fixes #1816

Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
@qwwdfsad qwwdfsad requested a review from elizarov May 8, 2020 09:18
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.

Let's add more details on StateFlow, though.

CHANGES.md Outdated Show resolved Hide resolved
@qwwdfsad qwwdfsad merged commit 583ec6e into master May 8, 2020
@qwwdfsad qwwdfsad deleted the version-1.3.6 branch May 18, 2020 11:25
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.

None yet

8 participants