diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-11-06 22:44:53 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-11-06 22:45:59 +0100 |
| commit | 8c2400d452cff5535db517ad88f3f0cb107c2542 (patch) | |
| tree | d5f0ebb349736949a89456cf43f6ead1b3ab9797 /main/src/cgeo/geocaching/utils/RxUtils.java | |
| parent | 0aaa9ab5d6aaa30e714c674e4111a7f86d7da039 (diff) | |
| download | cgeo-8c2400d452cff5535db517ad88f3f0cb107c2542.zip cgeo-8c2400d452cff5535db517ad88f3f0cb107c2542.tar.gz cgeo-8c2400d452cff5535db517ad88f3f0cb107c2542.tar.bz2 | |
Use default priority for sensors thread
Background priority might put the thread into the background cgroup
which only has access to a limited portion of the CPU. It might be the
cause of some lenghty delays (200 seconds) before events are taken into
account. There is no guarantee though.
Part of work on #4458.
Diffstat (limited to 'main/src/cgeo/geocaching/utils/RxUtils.java')
| -rw-r--r-- | main/src/cgeo/geocaching/utils/RxUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/utils/RxUtils.java b/main/src/cgeo/geocaching/utils/RxUtils.java index 69c3185..c10fd9e 100644 --- a/main/src/cgeo/geocaching/utils/RxUtils.java +++ b/main/src/cgeo/geocaching/utils/RxUtils.java @@ -18,6 +18,7 @@ import rx.subscriptions.Subscriptions; import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; +import android.os.Process; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; @@ -35,7 +36,7 @@ public class RxUtils { public static final Scheduler networkScheduler = Schedulers.from(new ThreadPoolExecutor(10, 10, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>())); private static final HandlerThread looperCallbacksThread = - new HandlerThread("Looper callbacks thread", android.os.Process.THREAD_PRIORITY_BACKGROUND); + new HandlerThread("Looper callbacks thread", Process.THREAD_PRIORITY_DEFAULT); static { looperCallbacksThread.start(); |
