Ignore:
Timestamp:
2015-09-08T15:20:34+02:00 (9 years ago)
Author:
simon04
Message:

see #11843 - Give all started threads sensible names

Utils#newThreadFactory creates a ThreadFactory to be used when
obtaining a new Executor via Executors.new….

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r8660 r8734  
    3737import java.util.concurrent.ExecutorService;
    3838import java.util.concurrent.Executors;
    39 import java.util.concurrent.ThreadFactory;
    4039
    4140import javax.swing.Action;
     
    9594
    9695    boolean useThumbs = false;
    97     private ExecutorService thumbsLoaderExecutor = Executors.newSingleThreadExecutor(new ThreadFactory() {
    98         @Override
    99         public Thread newThread(Runnable r) {
    100             Thread t = new Thread(r);
    101             t.setPriority(Thread.MIN_PRIORITY);
    102             return t;
    103         }
    104     });
     96    private ExecutorService thumbsLoaderExecutor =
     97            Executors.newSingleThreadExecutor(Utils.newThreadFactory("thumbnail-loader-%d", Thread.MIN_PRIORITY));
    10598    private ThumbsLoader thumbsloader;
    10699    private boolean thumbsLoaderRunning = false;
Note: See TracChangeset for help on using the changeset viewer.