Code example for ThreadPoolExecutor

Methods: execute, getQueue

0
        } 
 
        String dateTimeString = Utilities.GetIsoDateTime(now);
 
        Gpx10WriteHandler writeHandler = new Gpx10WriteHandler(dateTimeString, gpxFile, loc, addNewTrackSegment, satelliteCount);
        Utilities.LogDebug(String.format("There are currently %s tasks waiting on the GPX10 EXECUTOR.", EXECUTOR.getQueue().size()));
        EXECUTOR.execute(writeHandler);
    } 
 
    public void Annotate(String description, Location loc) throws Exception
    { 
        Date now;
 
        if (useSatelliteTime)
        { 
            now = new Date(loc.getTime());
        } 
        else 
        { 
            now = new Date();
        }