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

Merge with parent project #5

Merged
merged 19 commits into from
Dec 23, 2020
Merged

Conversation

circusmagnus
Copy link
Owner

No description provided.

qwwdfsad and others added 19 commits November 13, 2020 11:49
…cancel() (#2384)

Avoid creating costly exception when the channel is cancelled to save a few cycles when it's not necessary. Cancellation is heavy-enough when the channel is open, so the single check won't worsen it.
* Add lint warnings on SharedFlow operations that never complete

Fixes #2340
Fixes #2368

* ~ remove awaitCancellation replacements
It was a part of the original design but was forgotten because the prototype was developeв before Kotlin 1.4.0.
It makes implementing custom SharingStarted strategies more concise.
…ch of slow-path in Mutex/Semaphore (#2396)


Fixes #2390

Co-authored-by: Gareth Pearce <[email protected]>
* Clarify thread-safety of SharedFlow methods in docs

* Override MutableSharedFlow.emit to attach a more appropriate docs than the one inherited from FlowCollector.
* Clarify thread-safety of all the MutableSharedFlow & MutableState "mutating" methods.

The latter is needed, because Flows, in general, are sequential, but shared flows provide all the necessarily synchronization themselves, so, to avoid confusion it makes sense to additionally mention thread-safety of shared flows in all the relevant mutating functions.
* Add build parameters to enable JVM IR and disable native targets
    * enable_jvm_ir enables JVM IR compiler
    * disable_native_targets disables native targets in train builds
    * enable_jvm_ir_api_check enables JVM IR API check (works only if enable_jvm_ir is set)

* Fix "Return type must be specified in explicit API mode" in 1.4.20
* Remove platform-specific dependencies on JavaFx artifacts

Fixes #2360
…es and listenable futures (#2222)

* Repair some corner cases in cancellation propagation between coroutines and listenable futures

Implement bidirectional cancellation for `future` coroutine builder.

This also:

* Refactors JobListenableFuture infrastructure so it can be reused in CoroutineScope.future and Deferred.asListenableFuture;
* Provides more descriptive `toString` implementation for the returned Future;
* Fixes stack traces in thrown exception, so it includes a call to get() that triggered the exception to be thrown;
* Hides ListenableFuture.asDeferred return type, so it can't be cast to CompletableDeferred;
* Adds more tests to cover fixed corner cases;
* Improves documentation;
* Suppresses annoying warnings in tests.

Fixes #1442
@circusmagnus circusmagnus merged commit cfbd8ea into circusmagnus:master Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants