Java Code Examples for io.reactivex.schedulers.Schedulers#computation()

The following examples show how to use io.reactivex.schedulers.Schedulers#computation() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ThreadModeCastToSchedulersUtil.java    From RxEventBus with Apache License 2.0 6 votes vote down vote up
public static Scheduler cast(ThreadMode threadMode) {
    Scheduler scheduler = null;
    switch (threadMode) {
        case COMPUTATION:
            scheduler = Schedulers.computation();
            break;
        case NEWTHREAD:
            scheduler = Schedulers.newThread();
            break;
        case MAIN:
            scheduler = AndroidSchedulers.mainThread();
            break;
        case IO:
            scheduler = Schedulers.io();
            break;
        default:
            scheduler = AndroidSchedulers.mainThread();
            break;
    }
    return scheduler;
}
 
Example 2
Source File: Sandbox.java    From Reactive-Android-Programming with MIT License 5 votes vote down vote up
private void demo0() {
    Schedulers.single();
    Schedulers.trampoline();
    Schedulers.newThread();
    Schedulers.computation();
    Schedulers.io();
    Schedulers.io();
}
 
Example 3
Source File: Sandbox.java    From Reactive-Android-Programming with MIT License 5 votes vote down vote up
private void demo0() {
    Schedulers.single();
    Schedulers.trampoline();
    Schedulers.newThread();
    Schedulers.computation();
    Schedulers.io();
    Schedulers.io();
}
 
Example 4
Source File: ThreadUtil.java    From AndroidGodEye with Apache License 2.0 4 votes vote down vote up
public static Scheduler computationScheduler() {
    if (sComputationScheduler != null) {
        return sComputationScheduler;
    }
    return Schedulers.computation();
}
 
Example 5
Source File: SchedulerProvider.java    From News with Apache License 2.0 4 votes vote down vote up
@Override
@NonNull
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 6
Source File: SchedulerProvider.java    From mockstar with MIT License 4 votes vote down vote up
@Override
@NonNull
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 7
Source File: SchedulerProvider.java    From RetroMusicPlayer with GNU General Public License v3.0 4 votes vote down vote up
@Override
@NonNull
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 8
Source File: ApplicationModule.java    From iroha-android with Apache License 2.0 4 votes vote down vote up
@Provides
@Singleton
@Named(JOB)
public Scheduler provideJobScheduler() {
    return Schedulers.computation();
}
 
Example 9
Source File: EoscSchedulerProvider.java    From EosCommander with MIT License 4 votes vote down vote up
@Override
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 10
Source File: SchedulerProvider.java    From Melophile with Apache License 2.0 4 votes vote down vote up
@NonNull
public Scheduler computation() {
  return Schedulers.computation();
}
 
Example 11
Source File: AppSchedulerProvider.java    From android-mvp-architecture with Apache License 2.0 4 votes vote down vote up
@Override
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 12
Source File: SchedulerProvider.java    From android-mvp-realtime-chat with MIT License 4 votes vote down vote up
@NonNull
@Override
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 13
Source File: SchedulersFacade.java    From DaggerAndroidMVVM with Apache License 2.0 4 votes vote down vote up
/**
 * Computation thread pool scheduler
 */
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 14
Source File: AppSchedulerProvider.java    From android-mvvm-architecture with Apache License 2.0 4 votes vote down vote up
@Override
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 15
Source File: AppSchedulerProvider.java    From android-mvp-interactor-architecture with Apache License 2.0 4 votes vote down vote up
@Override
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 16
Source File: SchedulerModule.java    From firebase-android-sdk with Apache License 2.0 4 votes vote down vote up
@Provides
@Singleton
@Named("compute")
public Scheduler providesComputeScheduler() {
  return Schedulers.computation();
}
 
Example 17
Source File: SchedulersProviderImpl.java    From dhis2-android-capture-app with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@NonNull
@Override
public Scheduler computation() {
    return Schedulers.computation();
}
 
Example 18
Source File: SchedulerProvider.java    From mobius-android-sample with Apache License 2.0 4 votes vote down vote up
@Override
@NonNull
public Scheduler computation() {
  return Schedulers.computation();
}
 
Example 19
Source File: SchedulerProviderImplementation.java    From NYBus with Apache License 2.0 2 votes vote down vote up
/**
 * Provides the computation thread Scheduler.
 *
 * @return provides the computation thread Scheduler.
 */
@Override
public Scheduler provideComputationScheduler() {
    return Schedulers.computation();
}
 
Example 20
Source File: SchedulerProviderImpl.java    From NYBus with Apache License 2.0 2 votes vote down vote up
/**
 * Provides the computation thread Scheduler.
 *
 * @return provides the computation thread Scheduler.
 */
@Override
public Scheduler provideComputationScheduler() {
    return Schedulers.computation();
}