| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* Mark BroadcastChannel, ConflatedBroadcastChannel and all related operators as obsolete API replaced with SharedFlow and StateFlow
* Remove operator fusion with deprecated broadcastIn in order to simplify further Flow maintenance
|
|
|
|
|
|
|
|
|
|
| |
along the codebase (#2644)
* Deprecate SendChannel.offer and replace its usages along the codebase
* Deprecate ReceiveChannel.poll and replace its usages along the codebase
Co-authored-by: Roman Elizarov <elizarov@gmail.com>
Addresses #974
|
| |
|
|
|
|
|
|
| |
for error-prone offer, poll and receiveOrNull
Fixes #974
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Introduce SharedFlow and sharing operators
Summary of changes:
* SharedFlow, MutableSharedFlow and its constructor.
* StateFlow implements SharedFlow.
* SharedFlow.onSubscription operator, clarified docs in other onXxx operators.
* BufferOverflow strategy in kotlinx.coroutines.channels package.
* shareIn and stateIn operators and SharingStarted strategies for them.
* SharedFlow.flowOn error lint (up from StateFlow).
* Precise cancellable() operator fusion.
* Precise distinctUntilChanged() operator fusion.
* StateFlow.compareAndSet function.
* asStateFlow and asSharedFlow read-only view functions.
* Consistently clarified docs on cold vs hot flows.
* Future deprecation notice for BroadcastChannel, ConflatedBroadcastChannel, broadcast, and broadcastIn.
* Channel(...) constructor function has onBufferOverflow parameter.
* buffer(...) operator has onBufferOverflow parameter.
* shareIn/stateIn buffer and overflow strategy are configured via upstream buffer operators.
* shareIn/stateIn fuse with upstream flowOn for more efficient execution.
* conflate() is implemented as buffer(onBufferOverflow=KEEP_LATEST), non-suspending strategies are reasonably supported with 0 and default capacities.
* Added reactive operator migration hints.
* WhileSubscribed with kotlin.time.Duration params
Fixes #2034
Fixes #2047
Co-authored-by: Ibraheem Zaman <1zaman@users.noreply.github.com>
Co-authored-by: Thomas Vos <thomasjsvos@gmail.com>
Co-authored-by: Travis Wyatt <travis.i.wyatt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
* Channel onUnderliveredElement is introduced as a replacement.
Fixes #1265
Fixes #1813
Fixes #1915
Fixes #1936
Co-authored-by: Louis CAD <louis.cognault@gmail.com>
Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
|
|\ |
|
| | |
|
|/ |
|
|
|
|
| |
See https://youtrack.jetbrains.com/issue/KT-36776
|
| |
|
| |
|
|
|
|
|
|
| |
stacktrace even shorter
Also, fix stacktrace recovery in select clause
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* onSend/onReceive clauses on the same channel: Instead of
StackOverflowError we throw IllegalStateException and leave
the channel in the original state.
* Fix SOE in select with "opposite channels" stress-test. The fix is
based on the sequential numbering of atomic select operation.
Deadlock is detected and the operation with the lower sequential
number is aborted and restarted (with a larger number).
Fixes #504
Fixes #1411
|
| |
|
|
|
|
|
| |
* Make sure assertions are absent on native and JS
* Only print full toString for Job in debug mode
|
| |
|
|
|
|
|
| |
* JvmStatic on unbox did not make sense anyway
* unbox is useful for other symbols
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Job/ReceiveChannel/BroadcastChannel.cancel(Throwable) is now hidden and
cannot be invoked from a newly compiled code. This function had broken
semantics when used with an arbitrary exception. A safe replacement
is available in the form of cancel(CancellationException) where
CancellationException can be used to supply additional information
for debugging purposes.
Fixes #975
|
|
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
|