diff options
| author | blafoo <github@blafoo.de> | 2012-03-15 22:07:52 +0100 |
|---|---|---|
| committer | blafoo <github@blafoo.de> | 2012-03-15 22:07:52 +0100 |
| commit | 1f79ba322fd0777012d12fe6580ecb96a6012667 (patch) | |
| tree | d571dbdcd22a55032f84b513b2af299c2a9793cf | |
| parent | 7a5bd70b5458b5d2075c7ab84d31a9ed69083f47 (diff) | |
| download | cgeo-1f79ba322fd0777012d12fe6580ecb96a6012667.zip cgeo-1f79ba322fd0777012d12fe6580ecb96a6012667.tar.gz cgeo-1f79ba322fd0777012d12fe6580ecb96a6012667.tar.bz2 | |
Avoid increase of pool threads.
| -rw-r--r-- | main/src/cgeo/geocaching/maps/CGeoMap.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index cc21c2b..b44d87e 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -186,16 +186,16 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto private static Set<String> dirtyCaches = null; // Thread pooling - BlockingQueue<Runnable> displayQueue = new ArrayBlockingQueue<Runnable>(1); - ThreadPoolExecutor displayExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, displayQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); - BlockingQueue<Runnable> downloadQueue = new ArrayBlockingQueue<Runnable>(1); - ThreadPoolExecutor downloadExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, downloadQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); - BlockingQueue<Runnable> loadQueue = new ArrayBlockingQueue<Runnable>(1); - ThreadPoolExecutor loadExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, loadQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); - BlockingQueue<Runnable> Go4CacheQueue = new ArrayBlockingQueue<Runnable>(1); - ThreadPoolExecutor Go4CacheExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, Go4CacheQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); - BlockingQueue<Runnable> go4CacheDisplayQueue = new ArrayBlockingQueue<Runnable>(1); - ThreadPoolExecutor go4CacheDisplayExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, go4CacheDisplayQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); + private static BlockingQueue<Runnable> displayQueue = new ArrayBlockingQueue<Runnable>(1); + private static ThreadPoolExecutor displayExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, displayQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); + private static BlockingQueue<Runnable> downloadQueue = new ArrayBlockingQueue<Runnable>(1); + private static ThreadPoolExecutor downloadExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, downloadQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); + private static BlockingQueue<Runnable> loadQueue = new ArrayBlockingQueue<Runnable>(1); + private static ThreadPoolExecutor loadExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, loadQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); + private static BlockingQueue<Runnable> Go4CacheQueue = new ArrayBlockingQueue<Runnable>(1); + private static ThreadPoolExecutor Go4CacheExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, Go4CacheQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); + private static BlockingQueue<Runnable> go4CacheDisplayQueue = new ArrayBlockingQueue<Runnable>(1); + private static ThreadPoolExecutor go4CacheDisplayExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, go4CacheDisplayQueue, new ThreadPoolExecutor.DiscardOldestPolicy()); // handlers |
