Changeset 8734 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2015-09-08T15:20:34+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
r8673 r8734 77 77 // make queue of LIFO type - so recently requested tiles will be loaded first (assuming that these are which user is waiting to see) 78 78 new LinkedBlockingDeque<Runnable>(), 79 Utils. getNamedThreadFactory("JCS")79 Utils.newThreadFactory("JCS-downloader-%d", Thread.NORM_PRIORITY) 80 80 ); 81 81 -
trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
r8624 r8734 50 50 * and for TMS imagery 51 51 */ 52 private static ThreadPoolExecutor DEFAULT_DOWNLOAD_JOB_DISPATCHER = getNewThreadPoolExecutor("TMS 52 private static ThreadPoolExecutor DEFAULT_DOWNLOAD_JOB_DISPATCHER = getNewThreadPoolExecutor("TMS-downloader-%d"); 53 53 54 54 … … 74 74 75 75 /** 76 * @param name name of the threads76 * @param nameFormat see {@link Utils#newThreadFactory(String, int)} 77 77 * @param workers number of worker thread to keep 78 78 * @return new ThreadPoolExecutor that will use a @see HostLimitQueue based queue 79 79 */ 80 public static ThreadPoolExecutor getNewThreadPoolExecutor(String name, int workers) { 80 public static ThreadPoolExecutor getNewThreadPoolExecutor(String nameFormat, int workers) { 81 81 return new ThreadPoolExecutor( 82 82 workers, // keep the thread number constant … … 85 85 TimeUnit.SECONDS, 86 86 new HostLimitQueue(HOST_LIMIT.get().intValue()), 87 Utils. getNamedThreadFactory(name)87 Utils.newThreadFactory(nameFormat, Thread.NORM_PRIORITY) 88 88 ); 89 89 } -
trunk/src/org/openstreetmap/josm/data/imagery/WMSCachedTileLoader.java
r8624 r8734 34 34 35 35 super(listener, cache, connectTimeout, readTimeout, headers); 36 setDownloadExecutor(TMSCachedTileLoader.getNewThreadPoolExecutor("WMS 36 setDownloadExecutor(TMSCachedTileLoader.getNewThreadPoolExecutor("WMS-downloader-%d", THREAD_LIMIT.get())); 37 37 } 38 38 -
trunk/src/org/openstreetmap/josm/data/osm/MultipolygonBuilder.java
r8510 r8734 32 32 33 33 private static final Pair<Integer, ExecutorService> THREAD_POOL = 34 Utils.newThreadPool("multipolygon_creation.numberOfThreads"); 34 Utils.newThreadPool("multipolygon_creation.numberOfThreads", "multipolygon-builder-%d", Thread.NORM_PRIORITY); 35 35 36 36 /** -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r8632 r8734 87 87 88 88 private static final Pair<Integer, ExecutorService> THREAD_POOL = 89 Utils.newThreadPool("mappaint.StyledMapRenderer.style_creation.numberOfThreads"); 89 Utils.newThreadPool("mappaint.StyledMapRenderer.style_creation.numberOfThreads", "styled-map-renderer-%d", Thread.NORM_PRIORITY); 90 90 91 91 /**
Note:
See TracChangeset
for help on using the changeset viewer.