Changeset 11438 in josm for trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
- Timestamp:
- 2017-01-07T09:44:59+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
r10877 r11438 78 78 */ 79 79 public static ThreadPoolExecutor getNewThreadPoolExecutor(String nameFormat, int workers) { 80 return new ThreadPoolExecutor( 81 workers, // keep the thread number constant 80 HostLimitQueue workQueue = new HostLimitQueue(HOST_LIMIT.get().intValue()); 81 ThreadPoolExecutor executor = new ThreadPoolExecutor( 82 0, // 0 so for unused thread pools threads will eventually die, freeing also the threadpool 82 83 workers, // do not this number of threads 83 30 , // keepalive for thread84 300, // keepalive for thread 84 85 TimeUnit.SECONDS, 85 new HostLimitQueue(HOST_LIMIT.get().intValue()),86 workQueue, 86 87 Utils.newThreadFactory(nameFormat, Thread.NORM_PRIORITY) 87 88 ); 89 workQueue.setExecutor(executor); 90 return executor; 88 91 } 89 92
Note:
See TracChangeset
for help on using the changeset viewer.