Changeset 13653 in josm


Ignore:
Timestamp:
2018-04-21T02:08:55+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15744 - Don't use ForkJoinPool.commonPool for async image fetch, causes problems with WebStart

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r13652 r13653  
    685685    public CompletableFuture<Void> getAsync(Consumer<? super ImageIcon> action) {
    686686        return isRemote()
    687                 ? CompletableFuture.supplyAsync(this::get, IMAGE_FETCHER).thenAcceptAsync(action)
     687                ? CompletableFuture.supplyAsync(this::get, IMAGE_FETCHER).thenAcceptAsync(action, IMAGE_FETCHER)
    688688                : CompletableFuture.completedFuture(get()).thenAccept(action);
    689689    }
     
    730730    public CompletableFuture<Void> getResourceAsync(Consumer<? super ImageResource> action) {
    731731        return isRemote()
    732                 ? CompletableFuture.supplyAsync(this::getResource, IMAGE_FETCHER).thenAcceptAsync(action)
     732                ? CompletableFuture.supplyAsync(this::getResource, IMAGE_FETCHER).thenAcceptAsync(action, IMAGE_FETCHER)
    733733                : CompletableFuture.completedFuture(getResource()).thenAccept(action);
    734734    }
Note: See TracChangeset for help on using the changeset viewer.