blob: 8e7864c26258ee7f44fe4b838fcbab4ae88b0953 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package cgeo.geocaching.utils;
import rx.Scheduler;
import rx.schedulers.Schedulers;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class RxUtils {
// Utility class, not to be instanciated
private RxUtils() {}
final static private int cores = Runtime.getRuntime().availableProcessors();
public final static Scheduler computationScheduler = Schedulers.executor(new ThreadPoolExecutor(1, cores, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()));
}
|