Migrating from 1.x to 2.x
You are viewing the documentation for the older Monix 2.x series.
For the latest version: see here!
For the latest version: see here!
Package renamings:
monifu.concurrent
->monix.execution
monifu.reactive
->monix.reactive
Moved types:
monifu.reactive.Ack
->monix.execution.Ack
monifu.reactive.observers.SynchronousObserver
->monix.reactive.Observer.Sync
monifu.reactive.observers.SynchronousSubscriber
->monix.reactive.observers.Subscriber.Sync
monifu.reactive.Subscriber
->monix.reactive.observers.Subscriber
monifu.concurrent.extensions
->monix.execution.FutureUtils.extensions
- the
atomic.padded
package inmonifu.concurrent
is now gone, use theAtomic.withPadding
constructor instead (default wasRight128
) monifu.concurrent.async.AsyncQueue
is nowmonix.execution.misc.AsyncQueue
Renamed operators:
Observable.lift
->Observable.transform
Observable.onSubscribe
->Observable.unsafeSubscribeFn
(this one changed signature as well, it now returns aCancelable
instead ofUnit
)Observable.create
->Observable.unsafeCreate
and there’s a newObservable.create
with different behaviorAck.Cancel
->Ack.Stop
- for the
FutureUtils
extensionswithTimeout
was renamed totimeout
andliftTry
tomaterialize
, for consistency withTask
Observable.from
isObservable.apply
andObservable.unit
was renamed toObservable.now
Observable.whileBusyDropEvents(onOverflow)
renamed toObservable.whileBusyDropEventsAndSignal
Observable.toReactive
->toReactivePublisher
Cancelable.apply
now wants aFunction0
and not a by-name parameterObservable.doWork
->Observable.doOnNext
Observable.whileBusyBuffer
no longer takes anonOverflow
handler. TheonOverflow
handler is now a parameter of theOverflowStrategy
(DropNewAndSignal
andDropOldAndSignal
)Observable.buffer
->Observable.bufferTimedAndCounted
Observable.asFuture
is to be done asObservable.headL.runAsync
Observable.count
is to be done asObservable.fromTask(Observable.countL)
Observable.fold
is to be done asObservable.foldL
, now returning Task[T] not Future[Option[T]]
The Channel
type is now gone, replaced by:
monix.reactive.Observer.Sync
for describing just synchronous inputmonix.reactive.subjects.ConcurrentSubject
for describing synchronous input with attached output
Future
no longer converts to Observable
automatically. Use
Observable.fromFuture
.