Changeset 31546 in osm
- Timestamp:
- 2015-09-11T21:54:18+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java
r31540 r31546 10 10 import java.util.Map; 11 11 import java.util.Map.Entry; 12 import java.util.concurrent.Executor; 13 import java.util.concurrent.Executors; 12 14 13 15 import org.openstreetmap.gui.jmapviewer.interfaces.TileJob; 14 16 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader; 15 17 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; 18 import org.openstreetmap.josm.tools.Utils; 16 19 17 20 /** … … 21 24 */ 22 25 public class OsmTileLoader implements TileLoader { 26 private final static Executor jobDispatcher = 27 Executors.newSingleThreadExecutor( 28 Utils.newThreadFactory("OsmTileLoader-%d", Thread.NORM_PRIORITY) 29 ); 23 30 24 31 private final class OsmTileJob implements TileJob { … … 89 96 public void submit(boolean force) { 90 97 this.force = force; 91 run();98 jobDispatcher.execute(this); 92 99 } 93 100 }
Note:
See TracChangeset
for help on using the changeset viewer.