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.remove
wasn’t working after the changes in RC10, fixed it in RC11 and now added some more tests - Issue #213: Fixes
Task
/Coeval
memoize 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
eval
toevalAlways
across the board (inTask
,Coeval
andObservable
), but keptevalAlways
with the@deprecated
sign, so upgrade should be smooth. The reason is thatevalAlways
is an often used operation and deserves a shorter name - For Scalaz converts introduced
Task.delay
as an alias ofTask.eval
,Task.suspend
as an alias ofTask.defer
andTask.async
as 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.both
because it is just an alias forTask.mapBoth
. Judging in retrospective, we probably should’ve added it a@deprecated
warning instead; on the other handboth
andmapBoth
are so close that the IDE will probably suggestmapBoth
(at least IntelliJ IDEA does) - Refactor the
Task
internals again, for optimizations and simplifications:- Simplified the internal states, e.g. instead of having
Now
,Error
,Always
andOnce
, we now have a singleDelay(coeval)
, thus reusing theCoeval
type for computing asynchronous values - Get rid of the
Task.Attempt
type, it never made any sense that one. People can useCoeval.Attempt
if they need aTry
alternative (and convert toTask
if they end up needing aTask
) - Introduced
Scheduler.executeAsync
andScheduler.executeLocal
as extension methods powered by macros, for zero-overhead, because buildingRunnable
instances is too annoying - Used
Scheduler.executeLocal
andLocalRunnable
in key points in theTask
implementation to reduce forking - Made
Task.gather
be based onTask.gatherUnordered
and it is now way faster
- Simplified the internal states, e.g. instead of having
- Moved everything from
monix.types.shims
tomonix.types
Enjoy!