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.0-M1 #1258

Merged
merged 59 commits into from
Jun 6, 2019
Merged

Version 1.3.0-M1 #1258

merged 59 commits into from
Jun 6, 2019

Conversation

qwwdfsad
Copy link
Collaborator

@qwwdfsad qwwdfsad commented Jun 6, 2019

No description provided.

qwwdfsad and others added 30 commits April 26, 2019 13:16
…les like webpack configs may become corrupted
…1158)

* Fix exception types for channels to ensure transparency & reporting

* ReceiveChannel.cancel always closes channel with CancellationException,
  so sending or receiving from a cancelled channel produces the
  corresponding CancellationException.
* Cancelling produce builder has similar effect, but an more specific
  instance of JobCancellationException is created.
* This ensure that produce/consumeEach pair is transparent with respect
  to cancellation and can be used to build "identity" transformation
  of the flow (the corresponding test is added).
* ClosedSendChannelException is now a subclass of IllegalStateException,
  so that trying to send to a channel that was closed normally is
  reported as program error and is not eaten (test is added).

Fixes #957
Fixes #1128

* Exceptions for channels cleanup

    * Documentation improved
    * Better exception message
    * Simplified flowOn implementation
    * Avoid exception instantiation on happy path in zip
* Removed #1130 workaround from debounce
* Fixed race in debounce

Fixes #1130
* Updated to 0.12.7 version of atmoicfu with fixes.
* Added test that that is no references to atomicfu in any of the
  resulting class files.

Fixes #1155
* Fixed typos
* Added reference to kotlinx-coroutines-test for testing `Main` dispatcher
…id dependency on (frequently) unstable external JavaDoc resources

Fixes #648
…able).

    * Reasoning about cancellation is simplified in sequential scenarios, if 'cancel' was invoked before withContext return it will throw an exception, thus "isActive == false" cannot be observed in sequential scenarios after cancellation
    * withContext now complies its own documentation

Fixes #1177
…lect, transform, map, mapNotNull, filter, filterNot, filterNotNull) as inline
    * It is not that useful in an application code (-> is extracted into method), so won't bloat bytecode too much
    * It is crucial enough as building block to avoid excess allocations
    * Additionally mark inlined builders with labeled return to workaround KT-28938
    * RxJava2 by David Karnok
    * FlowPlaysScrabbleBase and FlowPlaysScrabbleOpt as flow counterparts
    * Lower bounds for Flow scrabble benchmark
* Mark ReceiveChannel.map with @ObsoleteCoroutinesApi

Fixes #1162
  * combineLatest(Iterable<Flow<T>>) is not added deliberately, use-case is unclear
  * All specific overloads are marked as inline to reduce binary compatibility pressure

Fixes #1193
  * Wrap exceptions into CE if parent cancels its child. This is possible because now we can be sure that no one is invoking `cancel(Throwable)`, thus if parent cancels its children, an exception is definitely handled.
  * Now exception is handled only once

First part of fix for #689
qwwdfsad and others added 28 commits May 24, 2019 12:41
Flow performance improvements and reactive benchmarks
#1214)

New flow builder: channelFlow (and its alias callbackFlow) and supplementary ProducerScope.await method

Rationale:

    * Can be used in different context without breaking context preservation
    * Can be used to build concurrent operators such as merge
    * Can be used to integrate with callbacks
    * Is less error-prone than flowViaChannel because requires explicit await() call

Partially fixes #1210
SafeCollector performance improvements:
* Cache result of the context check thus speeding up safe collector on happy path by a factor of three
* Separate fast and slow paths in JobSupport to drastically change inlining decisions of the JVM that are crucial for leaf coroutines with flows

Strengthen flow context preservation invariant

* Add additional check in SafeCollector with an error message pointing to channelFlow
* Improve performance of the CoroutineId check in SafeCollector
* Change wording in documentation

Fixes #1210
* JvmStatic on unbox did not make sense anyway
* unbox is useful for other symbols
* Improve MainCoroutineDispatcher.immediate documentation
* Remove obsolete readme and package descriptions
* Clarify possible replacement of onCompletion parameter in produce
* Add paragraph about parent cancellation to async (Mention structured concurrency, but do not explain it there as the term should be easily googlable).

Fixes #1219
Fixes #994 
Fixes #787
… dispatchers.

Use Promise.resolve and process.nextTick as dispatch mechanism for cold starts
The developer still has to disable the FastServiceLoader manually
if they're using R8.

R8 is then able to optimize away the ServiceLoader and reflection
entirely, resulting in direct class instantiation and no extra I/O
on calling thread.

Fixes #1231
* Introduce buffer operator
* Remove buffer size from all the other operators
* Fuse all adjacent operators that create channels
* Introduce Channel.BUFFERED buffer size marker to request
  buffered channel with a default (unspecified) size

Fixes #1233
* Introducing flowScope, builder necessary for creating cancellation-transparent flow operators
* Incorporate flow scope into flow operators

Fixes #1218
Fixes #1128
* Scan and emitAll operators
* Flow.first operators family (without firstOrNull and firstOrDefault support)
* More migrations

Fixes #1094
Fixes #1078
Fixes #1244
In addition, the `SegmentQueue` data structure, which emulates an infinite array with fast removing from the middle, is introduced for storing suspended acquirers in semaphore/mutex/channel algorithms.

Fixes #1088
…d provide AbstractFlow instead that enforces context preservation guarantees
@qwwdfsad qwwdfsad merged commit 7699a20 into master Jun 6, 2019
@qwwdfsad qwwdfsad deleted the version-1.3.0-M1 branch September 17, 2019 16:02
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