Code example for ThreadPoolExecutor

Methods: execute

0
    public void Write(Location loc) throws Exception
    { 
        Kml22WriteHandler writeHandler = new Kml22WriteHandler(loc, kmlFile, addNewTrackSegment);
        EXECUTOR.execute(writeHandler);
    } 
 
    public void Annotate(String description, Location loc) throws Exception
    { 
        Kml22AnnotateHandler annotateHandler = new Kml22AnnotateHandler(kmlFile, description, loc);
        EXECUTOR.execute(annotateHandler);
    } 
 
    @Override 
    public String getName()
    { 
        return name;
    } 
} 
 
class Kml22AnnotateHandler implements Runnable