We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5e3b5b commit 3919547Copy full SHA for 3919547
rxjava-contrib/rxjava-android/src/main/java/rx/concurrency/AndroidSchedulers.java
@@ -0,0 +1,19 @@
1
+package rx.concurrency;
2
+
3
+import android.os.Handler;
4
+import android.os.Looper;
5
+import rx.Scheduler;
6
7
+public class AndroidSchedulers {
8
9
+ private static final Scheduler MAIN_THREAD_SCHEDULER =
10
+ new HandlerThreadScheduler(new Handler(Looper.getMainLooper()));
11
12
+ public static Scheduler handlerThread(final Handler handler) {
13
+ return new HandlerThreadScheduler(handler);
14
+ }
15
16
+ public static Scheduler mainThread() {
17
+ return MAIN_THREAD_SCHEDULER;
18
19
+}
0 commit comments