Ignore:
Timestamp:
2015-09-08T15:20:34+02:00 (11 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/Main.java

    r8513 r8734  
    168168     * and sequential.
    169169     */
    170     public static final ExecutorService worker = new ProgressMonitorExecutor();
     170    public static final ExecutorService worker = new ProgressMonitorExecutor("main-worker-%d", Thread.NORM_PRIORITY);
    171171
    172172    /**
     
    625625
    626626        try {
    627             for (Future<Void> i : Executors.newFixedThreadPool(
    628                     Runtime.getRuntime().availableProcessors()).invokeAll(tasks)) {
     627            final ExecutorService service = Executors.newFixedThreadPool(
     628                    Runtime.getRuntime().availableProcessors(), Utils.newThreadFactory("main-init-%d", Thread.NORM_PRIORITY));
     629            for (Future<Void> i : service.invokeAll(tasks)) {
    629630                i.get();
    630631            }
Note: See TracChangeset for help on using the changeset viewer.