Asynchronous, Reactive Programming for Scala and Scala.js.
This release depends on Cats-Effect 1.3.1 and Cats 1.6.1.
The next planned release will target Cats-Effect 2.0.0 with Scala 2.13 support.
NOTE: this release IS NOT binary compatible with 3.0.0-RC2, as it contains some API changes, but it should be source compatible (with @deprecated symbols where the case).
This sub-project no longer depends on cats-effect and there are various
improvement to Local
aimed at fixing interop with Future
. Note that
you might have to call Local.isolate
to disable any sharing between tasks.
PR #775: Simplified FutureUtils materialize & dematerialize
PR #790: improve fixed rate scheduling on JS
PR #803: Eagerly null out dequeued elements in ChunkedArrayQueue
PR #822: remove dependency on cats-effect from monix-execution
PR #773: change Cancelable.empty type to Cancelable
PR #887: Shared locals with binds
PR #888: Fix uncaught exception reporting for Scheduler
PR #778: Adds ConcurrentChannel
PR #784: More concurrent tests for MVar/Semaphore
PR #865: Adding FunctionK values for Task, Coeval
PR #802: encapsulate local ctx on task execution
PR #807: Improve encapsulation test, encapsulate locals on ContextShift
PR #838: Add taskified variants of timeout combinators
PR #839: TaskLocal should propagate when used with Bracket Methods
PR #849: Specify exception on timeout
PR #887: Shared locals with binds
PR #865: Adding FunctionK values for Task, Coeval
PR #759: Add Contravariant Observer and Subscriber
PR #760: add Observable.filterEval
PR #774: Add FunctorFilter instances for Iterant&Observable
PR #779: fork blocking i/o observable ops
PR #794: Acquire lock per subscription instead of observable-wide lock
PR #801: Observable buffers refactoring
PR #819: Extend ObservableLike with filterNot method
PR #831: SerializableSuite to no longer test Future for serializability
PR #834: Observable.reduce should emit for single item source
PR #846: Ensure mapParallelOrdered runs in parallel
PR #872: Add observable take while inclusive
PR #895: Fix memory leak in MapParallelOrderedObservable
PR #766: Update sbt-unidoc to 0.4.2
PR #766: Update sbt-pgp to 1.1.2
PR #768: Update sbt-mima-plugin to 0.3.0
PR #769: Update sbt-git to 1.0.0
PR #770: Update jctools-core to 2.1.2
PR #771: Update kind-projector to 0.9.8
PR #772: Update sbt-jmh to 0.3.4
PR #771: Update kind-projector to 0.9.9
PR #783: Use globally accessible (rather than local) source paths in JS source maps (#781)
PR #785: Update sbt-scalajs, scalajs-compiler, scalajs-library... to 0.6.26
PR #788: Update cats-effect, cats-effect-laws to 1.1.0
PR #796: fix scalacOptions
PR #797: Scala 2.12.8
PR #798: Update intervalWithFixedDelay scaladoc
PR #805: Rename keysBuffer to os in groupBy's parameters
PR #808: Update Copyright to 2019
PR #810: sbt 1.2.8 (was 1.1.0)
PR #812: Update Minitest to 2.3.2
PR #813: Disable code coverage
PR #818: Update Cats-Effect to 1.2.0
PR #820: Update cats-laws to 1.5.0
PR #821: Update cats-laws to 1.6.0
PR #823: Scala 2.13 support
PR #821: Update sbt-header to 5.1.0
PR #827: Remove comments from .jvmopts
PR #833: Fix build for 2.13.0-M5 by deactivating Mima for it
PR #840: Add adopters list seed
PR #842: Fixed deprecation docs for Task#coeval
PR #843: Remove dead code from tests
PR #844: Update sbt-header to 5.2.0
PR #847: Update ExecutionModel.scala
PR #850: Increase rate in AsyncSchedulerSuite
PR #854: fix apparently erronous code involving Unit companion
PR #855: Update sbt-jmh to 0.3.5
PR #857: Make benchmarks compile
PR #859: Update sbt-scalajs, scalajs-compiler to 0.6.27
PR #867: Update kind-projector to 0.10.0
PR #869: fix compile errors with latest Scala 2.13
PR #874: Update cats-effect, cats-effect-laws to 1.3.0
PR #878: Compile Benchmarks in CI
PR #879: Do on subscription cancel scaladoc fix
PR #889: Update cats-effect, cats-effect-laws to 1.3.1
PR #894: Add UnsafeBecauseImpure Annotation to foreach.
PR #896: Update cats-laws to 1.6.1
PR #898: Reformating via Scalafmt
PR #899: Fix autoCancelableRunLoops comment.
PR #901: avoid deprecated unicode arrow chars
PR #902: reformat build files
People that made this release possible, in alphabetical order:
And special thanks to our top contributor in this release: https://github.com/fthomas/scala-steward :)
Final milestone release before the RC and the final and stable 3.0.0
.
Special thanks to Leandro Bolivar for implementing propagation of "local vars" (aka Local
and TaskLocal
, the equivalents of ThreadLocal
, but for usage with Future
and Task
). The inspiration was com.twitter.util.Local and scala.util.DynamicVariable.
Right now the Monix Task
is the only (known) IO data type for Scala that can work with such locals and because of the provided TracingScheduler
, you can work with Scala's Future
too.
See:
This release also lands a long awaited feature for Task
— pure cancellation, aka Task.cancel
. It's building on top of the current Task
implementation, however it changes the API — e.g. in order to keep Task
pure, the chooseFirstOf
operator is now gone, being replaced with an equivalent racePair
that operates with tasks and pure functions.
See:
One other highlight of the release are the performance improvements for Task
and Coeval
, an on-going process to make sure that Monix's Task
remains the best implementation in Scala's ecosystem.
See:
We now depend on Cats 1.0.1
and cats-effect 0.8
.
This unblocks the 3.0.0 release, because Cats 1.x has stronger backwards compatibility guarantees.
2.12.4
and 2.11.12
, JCTools to 2.1.1
, Minitest to 2.0.0
, Scala.js to 0.6.21
timeoutTo
to cancel source task directly after timeoutlocalContextPropagation
to Task.Options
, implement tracing Local
varsfromAsyncStateAction
is not safe for user code1.0.1
and cats-effect to 0.8
Task
/ Coeval
Run-loop Optimizations, First BatchTask.cancel
as a pure action, along with .start
, .race
and .uncancelable
Release is binary backwards compatible with series 2.3.x
.
Bug fixes:
concat
don't get canceled
(critical)MVar.put
observable.take(0)
shouldn't subscribe to the source at allObservable.fromAsyncStateAction
does not protect against
exceptions thrown in use codeIssue #468 in particular is pretty serious as it can lead to resource leaks. Read the pull request for more details.
Upgrade to 2.3.3
is recommended!
This release upgrades Cats to 1.0-RC1 and cats-effect
to 0.5
.
This involved changes to the exposed instances:
import Task.nondeterminism
) is gonecats.Parallel
instead, a new type class that's exposing an alternative Applicative
that doesn't do ordering in ap
and map2
Iterant
now exposes parZip
and parZipMap
for doing zips in parallel, based on cats.Parallel
Enjoy!
This is a major release that breaks both binary and source compatibility. The major themes of this release:
Iterant
data type for lawful pull-based streaming, in a new monix-tail
sub-projectObservable
, Task
, Coeval
and CancelableFuture
Typelevel Cats integration:
cats-effect
as direct dependenciesCoeval.Attempt
to Coeval.Eager
)1.0.0-MF
, removed deprecated functions and classesCoeval
's Comonad
implementationCoflatMap
New monix-tail
sub-project, exposing monix.tail.Iterant[F[_], A]
:
Iterant[F[_], A]
for pull-based streaming based on Task
/ Coeval
Iterant.scan
operatorIterant.foldWhileLeftL
and Iterant.foldWhileLeftEvalL
operatorsexistsL
, forallL
, changes Observable.foldWhileL
(breaking change)Iterant.foldRightL
operatorIterant
ops - findL
, foldL
, maxL
, minL
, reduceL
Iterant
ops - countL
, distinctUntilChanged
, distinctUntilChangedByKey
scanEval
on both Iterant
and Observable
Observable
and Iterant
Iterant.bufferSliding
, bufferTumbling
and batched
operatorsIterant
Improvements for monix-execution
and CancelableFuture
:
flatMap
on CancelableFuture
to cancel all involved futures (thanks to @larsrh)CancelableFuture
CancelableFuture
to get rid of memory leak, also adding utils like CancelableFuture.async
CancelableFuture
, since describing a cancellable flatMap
is a hard problemAtomicBoolean
(thanks to @Wogan
)Improvements for monix-reactive
and Observable
:
Iterant
and Cats consistency (make use of Eq
and Order
type classes, add foldF
and foldL
, remove distinct
and distinctByKey
)Observable.intersperse
operator (thanks to @omainegra)contramap
method to Callback (thanks to @Wogan)ObservableLike
, makes Observable
an abstract class
where the operators are final, Pipe
no longer has Observable
's operators, just transform
Improvements for monix-eval
, Task
and Coeval
:
Task
and Coeval
performance optimisationsTask.shift
, an innovation inspired by cats.effect.IO
Task
refactoring, gets rid of Task.OnFinish
type aliasCoeval
and Task
refactoring to the run
methods for consistency, introduced map2
, map3
...map6
on both Task
and Coeval
, renamed zipMap*
to parMap2
, parMap3
... parMap6
for Task
Administrative and build changes: