These are chat archives for ReactiveX/RxJava

12th
Dec 2018
Ewan Higgs
@ehiggs
Dec 12 2018 12:25
hey hey. Do you reckon Maybe should have a version of just that takes an Optional<T> that translates it to .map(o -> Maybe.just(o)).orElse(Maybe.never()) ?
Also, None of the .from methods seem to support CompletableFuture directly and some of them claim that there is some blocking behaviour when using fromFuture. Is that the correct bridge between CompletableFuture<?> and e.g. Single<?> ?
Menkir
@Menkir
Dec 12 2018 12:34
image.png
Hey guys im trying to understand the purpose of subscribeON and observeOn.
Am i right with my understanding?
Dan O'Reilly
@dano
Dec 12 2018 15:44
@ehiggs A lot of what you're suggesting is provided in https://github.com/akarnokd/RxJava2Jdk8Interop, fwiw
Ewan Higgs
@ehiggs
Dec 12 2018 15:44
@dano, thanks :)
Dan O'Reilly
@dano
Dec 12 2018 15:44
there's MaybeInterop.fromOptional, and mapOptional
i think FlowableInterop does it, too
it also has some fromFuture APIs, not sure if they provide what you're looking for, though
Ewan Higgs
@ehiggs
Dec 12 2018 20:19
I'm having a weird problem where I want to split a stream into var first = stream.firstOrError() and var rest = stream.skip(1). Then I do first.map(f -> someFunction(f, rest)). But when the first is done with that first element it cancels the rest of the stream which seems to hang up on rest. This is when using reactive-grpc... (I don't seem to be able to reproduce it using Flowable.just type tests even though cancel is called inside rxjava). is there a way to multiplex a stream like this?