changed to one thread back
This commit is contained in:
parent
6eaa7fe987
commit
d8a720567d
|
|
@ -26,6 +26,9 @@ public class SequenceObservableExecutor {
|
|||
|
||||
@NonNull
|
||||
private final Scheduler sendingScheduler = Schedulers.from(Executors.newSingleThreadExecutor());
|
||||
@NonNull
|
||||
private final Scheduler executeScheduler = Schedulers.from(Executors.newSingleThreadExecutor(
|
||||
new ProcessPriorityThreadFactory(Thread.MIN_PRIORITY)));
|
||||
|
||||
@NonNull
|
||||
public Observable<?> execute(@NonNull final Observable<?> completable) {
|
||||
|
|
@ -53,8 +56,7 @@ public class SequenceObservableExecutor {
|
|||
scheduleSubscription = sendingScheduler.createWorker().schedule(() -> {
|
||||
final CountDownLatch blocker = new CountDownLatch(1);
|
||||
executeSubscription = completable
|
||||
//TODO understand how to change this to a single thread
|
||||
.subscribeOn(Schedulers.from(Executors.newSingleThreadExecutor(new ProcessPriorityThreadFactory(Thread.MIN_PRIORITY))))
|
||||
.subscribeOn(executeScheduler)
|
||||
.doOnUnsubscribe(blocker::countDown)
|
||||
.subscribe(Actions.empty(), subscriber::onError, subscriber::onCompleted);
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue