Callback received in Task.create should be thread-safe and should shift back to default Scheduler#917
Merged
Merged
Conversation
Member
Author
|
Released test version: |
Avasil
reviewed
Jul 28, 2019
Avasil
reviewed
Jul 28, 2019
oleg-py
reviewed
Jul 29, 2019
oleg-py
approved these changes
Jul 29, 2019
mdedetrich
pushed a commit
to mdedetrich/monix
that referenced
this pull request
Mar 28, 2020
…ft back to default Scheduler (monix#917) * Issue monix#908 - test * Making callback idempotent * Silence errors * Small fix * Fix bug * Working on tests * More tests for Task * Cleanup old tess * Fix mima * Formatting * Cleanup Mima filters * Revert tests * Remove IntelliJ junk * Remove IntelliJ junk * Fix formatting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes in these PR:
Callbackpassed inTask.async(and variants) should be thread-safeonSuccess/onErrorare called twice, anIllegalStateExceptionis still being thrown, the difference is that now this conflict is able to be detected in a multi-threading contextallowContinueOnCallingThreadflag onTask.async,Task.cancelable,Task.create, etc... introduced in Shifting back to the default pool in Task.fromFuture, Task.async and … #921registerfunction actually forks and if so, then we shift back, if not then we don't shiftTask.fromFutureto useFuture.onCompleteas it was meant to be used