Changeset 17496 in josm for trunk


Ignore:
Timestamp:
2021-02-20T09:35:18+01:00 (4 years ago)
Author:
wiktorn
Message:

Fix regression from [17494]

Do not shutdown the thread pool, if this is default one. We do share one thread pool
for all TMS downloads.

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java

    r16553 r17496  
    158158        return downloadExecutor;
    159159    }
     160
     161    /**
     162     * Shutdown the job dispatcher provided that it's not the default one
     163     */
     164    public void shutdown() {
     165        if (!downloadExecutor.equals(DEFAULT_DOWNLOAD_JOB_DISPATCHER)) {
     166            downloadExecutor.shutdown();
     167        }
     168    }
    160169}
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r17495 r17496  
    18841884                TMSCachedTileLoader cachedTileLoader = (TMSCachedTileLoader) tileLoader;
    18851885                cachedTileLoader.cancelOutstandingTasks();
    1886                 cachedTileLoader.getDownloadExecutor().shutdown();
     1886                cachedTileLoader.shutdown();
    18871887            }
    18881888        }
     
    19041904                TMSCachedTileLoader cachedTileLoader = (TMSCachedTileLoader) tileLoader;
    19051905                cachedTileLoader.cancelOutstandingTasks();
    1906                 cachedTileLoader.getDownloadExecutor().shutdown();
     1906                cachedTileLoader.shutdown();
    19071907            }
    19081908        }
     
    19641964        if (tileLoader instanceof TMSCachedTileLoader) {
    19651965            TMSCachedTileLoader cachedTileLoader = (TMSCachedTileLoader) tileLoader;
    1966             cachedTileLoader.getDownloadExecutor().shutdown();
     1966            cachedTileLoader.shutdown();
    19671967        }
    19681968    }
Note: See TracChangeset for help on using the changeset viewer.