Avoiding OperatorObserveOn from calling subscriber.onNext(..) after unsu...

...bscribe().

The OperatorObserveOn operator uses a scheduler to cancel subscriptions as well
as to deliver the objects passing through it's onNext(..) in the right context.

Calling unsubscribe will schedule the actual unsubscription while not making sure
that the child subscriber will no longer receive calls to onNext(..) after
unsubscribe() returns.

This fix makes sure that after unsubscribe() returns no more onNext(..) calls will be
made on the child subscribers.

Signed-off-by: David Marques <dpsmarques@gmail.com>
@akarnokd that's a good point. I was wondering if calling unsubscribe() on the worker directly in the context of the original subscription.unsubscribe() call wouldn't make more sense instead of scheduling.

Given that the OperatorSubscribeOn schedules the delivery serially (refer to COUNTER_UPDATER), it would make more sense and give an opportunity to the worker to cancel the actions pending immediately.