Changeset 12542 in josm for trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
- Timestamp:
- 2017-07-30T17:07:42+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
r12537 r12542 51 51 // we need another deduplication of Tile Loader listeners, as for each submit, new TMSCachedTileLoaderJob was created 52 52 // that way, we reduce calls to tileLoadingFinished, and general CPU load due to surplus Map repaints 53 private static final ConcurrentMap<String, Set<TileLoaderListener>> IN_PROGRESS= new ConcurrentHashMap<>();53 private static final ConcurrentMap<String, Set<TileLoaderListener>> inProgress = new ConcurrentHashMap<>(); 54 54 55 55 /** … … 71 71 if (listener != null) { 72 72 String deduplicationKey = getCacheKey(); 73 synchronized ( IN_PROGRESS) {74 Set<TileLoaderListener> newListeners = IN_PROGRESS.get(deduplicationKey);73 synchronized (inProgress) { 74 Set<TileLoaderListener> newListeners = inProgress.get(deduplicationKey); 75 75 if (newListeners == null) { 76 76 newListeners = new HashSet<>(); 77 IN_PROGRESS.put(deduplicationKey, newListeners);77 inProgress.put(deduplicationKey, newListeners); 78 78 } 79 79 newListeners.add(listener); … … 162 162 this.attributes = attributes; // as we might get notification from other object than our selfs, pass attributes along 163 163 Set<TileLoaderListener> listeners; 164 synchronized ( IN_PROGRESS) {165 listeners = IN_PROGRESS.remove(getCacheKey());164 synchronized (inProgress) { 165 listeners = inProgress.remove(getCacheKey()); 166 166 } 167 167 boolean status = result.equals(LoadResult.SUCCESS);
Note:
See TracChangeset
for help on using the changeset viewer.