package com.swiftcleaner.chovey.model.util;


import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Scheduler;
import io.reactivex.rxjava3.schedulers.Schedulers;

/**
 * 作者：马海钊
 * 时间：2024/12/25 14:36
 * 功能：
 */
public class AppSchedulers {
    private static final Scheduler IO_SCHEDULER = Schedulers.io();
    private static final Scheduler COMPUTATION_SCHEDULER = Schedulers.computation();
    private static final Scheduler MAIN_THREAD_SCHEDULER = AndroidSchedulers.mainThread();

    private AppSchedulers() {
        // 避免外部实例化
    }

    public static Scheduler io() {
        return IO_SCHEDULER;
    }

    public static Scheduler computation() {
        return COMPUTATION_SCHEDULER;
    }

    public static Scheduler mainThread() {
        return MAIN_THREAD_SCHEDULER;
    }
}
