MCPcopy Create free account
hub / github.com/AndroidKnife/RxBus / EventThread

Enum EventThread

rxbus/src/main/java/com/hwangjr/rxbus/thread/EventThread.java:12–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11
12public enum EventThread {
13 /**
14 * {@link Scheduler} which will execute actions on the Android UI thread.
15 */
16 MAIN_THREAD,
17
18 /**
19 * Creates and returns a {@link Scheduler} that creates a new {@link Thread} for each unit of work.
20 * <p/>
21 * Unhandled errors will be delivered to the scheduler Thread's {@link java.lang.Thread.UncaughtExceptionHandler}.
22 */
23 NEW_THREAD,
24
25 /**
26 * Creates and returns a {@link Scheduler} intended for IO-bound work.
27 * <p/>
28 * The implementation is backed by an {@link Executor} thread-pool that will grow as needed.
29 * <p/>
30 * This can be used for asynchronously performing blocking IO.
31 * <p/>
32 * Do not perform computational work on this scheduler. Use computation() instead.
33 * <p/>
34 * Unhandled errors will be delivered to the scheduler Thread's {@link java.lang.Thread.UncaughtExceptionHandler}.
35 */
36 IO,
37
38 /**
39 * Creates and returns a {@link Scheduler} intended for computational work.
40 * <p/>
41 * This can be used for event-loops, processing callbacks and other computational work.
42 * <p/>
43 * Do not perform IO-bound work on this scheduler. Use io() instead.
44 * <p/>
45 * Unhandled errors will be delivered to the scheduler Thread's {@link java.lang.Thread.UncaughtExceptionHandler}.
46 */
47 COMPUTATION,
48
49 /**
50 * Creates and returns a {@link Scheduler} that queues work on the current thread to be executed after the
51 * current work completes.
52 */
53 TRAMPOLINE,
54
55 /**
56 * Creates and returns a {@link Scheduler} that executes work immediately on the current thread.
57 */
58 @Deprecated
59 IMMEDIATE,
60
61 /**
62 * Converts an {@link Executor} into a new Scheduler instance.
63 */
64 EXECUTOR,
65
66 /**
67 * {@link Scheduler} which uses the provided {@link Handler} to execute actions.
68 */
69 HANDLER;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected