Monix: Version 2.0-RC13 Released
This version fixes Task.memoize and Coeval.memoize, while
introducing even more and quite significant Task optimizations.
More details on performance to follow.
NOTE: version 2.0-RC13 was published immediately after version
2.0-RC12, due to a critical bug reported by Mark Tomko and
immediately fixed in
issue #215.
See the published API Documentation.
Bug fixes:
- Issue #215: Bug in Task.gatherUnordered
- Issue #211:
CompositeCancelable.removewasn’t working after the changes in RC10, fixed it in RC11 and now added some more tests - Issue #213: Fixes
Task/Coevalmemoize operation
Enhancements:
- Issue #212: Upgraded Cats to version 0.7.0
- PR #214: optimize Task, refactorings, some deprecations (details below)
Details on PR #214:
- Upgraded the Cats dependency to version 0.7.0. Had some trouble with that (see cats#1329), but it is now functional
- Renamed
evaltoevalAlwaysacross the board (inTask,CoevalandObservable), but keptevalAlwayswith the@deprecatedsign, so upgrade should be smooth. The reason is thatevalAlwaysis an often used operation and deserves a shorter name - For Scalaz converts introduced
Task.delayas an alias ofTask.eval,Task.suspendas an alias ofTask.deferandTask.asyncas an alias ofTask.create - Renamed
Task.eval(Coeval)toTask.coeval(Coeval)andObservable.eval(Coeval)toObservable.coeval(Coeval)in order to avoid a conflict - Removed
Task.bothbecause it is just an alias forTask.mapBoth. Judging in retrospective, we probably should’ve added it a@deprecatedwarning instead; on the other handbothandmapBothare so close that the IDE will probably suggestmapBoth(at least IntelliJ IDEA does) - Refactor the
Taskinternals again, for optimizations and simplifications:- Simplified the internal states, e.g. instead of having
Now,Error,AlwaysandOnce, we now have a singleDelay(coeval), thus reusing theCoevaltype for computing asynchronous values - Get rid of the
Task.Attempttype, it never made any sense that one. People can useCoeval.Attemptif they need aTryalternative (and convert toTaskif they end up needing aTask) - Introduced
Scheduler.executeAsyncandScheduler.executeLocalas extension methods powered by macros, for zero-overhead, because buildingRunnableinstances is too annoying - Used
Scheduler.executeLocalandLocalRunnablein key points in theTaskimplementation to reduce forking - Made
Task.gatherbe based onTask.gatherUnorderedand it is now way faster
- Simplified the internal states, e.g. instead of having
- Moved everything from
monix.types.shimstomonix.types
Enjoy!