Ignore:
Timestamp:
2017-08-24T15:54:00+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.worker, replace it by gui.MainApplication.worker + code refactoring to make sure only editor packages use it

File:
1 edited

Legend:

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

    r12633 r12634  
    5959import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
    6060import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    61 import org.openstreetmap.josm.gui.progress.ProgressMonitorExecutor;
    6261import org.openstreetmap.josm.gui.util.GuiHelper;
    6362import org.openstreetmap.josm.gui.util.RedirectInputMap;
     
    123122    /**
    124123     * The worker thread slave. This is for executing all long and intensive
    125      * calculations. The executed runnables are guaranteed to be executed separately
    126      * and sequential.
    127      */
    128     public static final ExecutorService worker = new ProgressMonitorExecutor("main-worker-%d", Thread.NORM_PRIORITY);
     124     * calculations. The executed runnables are guaranteed to be executed separately and sequential.
     125     * @deprecated use {@link MainApplication#worker} instead
     126     */
     127    @Deprecated
     128    public static final ExecutorService worker = MainApplication.worker;
    129129
    130130    /**
     
    855855    protected void shutdown() {
    856856        if (!GraphicsEnvironment.isHeadless()) {
    857             worker.shutdown();
    858857            ImageProvider.shutdown(false);
    859858            JCSCacheManager.shutdown();
     
    867866        }
    868867        if (!GraphicsEnvironment.isHeadless()) {
    869             worker.shutdownNow();
    870868            ImageProvider.shutdown(true);
    871869        }
Note: See TracChangeset for help on using the changeset viewer.