Ticket #15539: v1-0005-TMSCachedTileLoader-add-implementation-of-hasOutstan.patch

File v1-0005-TMSCachedTileLoader-add-implementation-of-hasOutstan.patch, 1.2 KB (added by ris, 6 years ago)
  • src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java

    From a0fe63adbc384195f1dd39c749c26e687fff738c Mon Sep 17 00:00:00 2001
    From: Robert Scott <code@humanleg.org.uk>
    Date: Sat, 11 Nov 2017 21:28:22 +0000
    Subject: [PATCH 5/6] TMSCachedTileLoader: add implementation of
     hasOutstandingTasks()
    
    ---
     src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java b/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
    index 6bf73f8d5..e9b49a288 100644
    a b public class TMSCachedTileLoader implements TileLoader, CachedTileLoader {  
    126126        }
    127127    }
    128128
     129    @Override
     130    public boolean hasOutstandingTasks() {
     131        return this.downloadExecutor.getTaskCount() > this.downloadExecutor.getCompletedTaskCount();
     132    }
     133
    129134    /**
    130135     * Sets the download executor that will be used to download tiles instead of default one.
    131136     * You can use {@link #getNewThreadPoolExecutor} to create a new download executor with separate