diff options
| author | Keith Packard <keithp@keithp.com> | 2012-03-26 22:05:04 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-03-26 22:05:04 -0700 | 
| commit | c2550d72aee371676d2f09316051567681e53a7c (patch) | |
| tree | a9eaa2f54e15d56f61084ca9150ba0fd10e79df6 /altosui/AltosSiteMap.java | |
| parent | 8610fdae8f47e1e8b6e8525227cc912664ecfafd (diff) | |
altosui: Use ConcurrentHashMap for maps
This data structure is accessed by multiple threads, so it needs to be
re-entrant.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosSiteMap.java')
| -rw-r--r-- | altosui/AltosSiteMap.java | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/altosui/AltosSiteMap.java b/altosui/AltosSiteMap.java index c258b3e5..63995c40 100644 --- a/altosui/AltosSiteMap.java +++ b/altosui/AltosSiteMap.java @@ -31,6 +31,7 @@ import java.util.prefs.*;  import java.lang.Math;  import java.awt.geom.Point2D;  import java.awt.geom.Line2D; +import java.util.concurrent.*;  public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {  	// preferred vertical step in a tile in naut. miles @@ -110,7 +111,7 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {  		return latlng(pt, scale_x, scale_y);  	} -	HashMap<Point,AltosSiteMapTile> mapTiles = new HashMap<Point,AltosSiteMapTile>(); +	ConcurrentHashMap<Point,AltosSiteMapTile> mapTiles = new ConcurrentHashMap<Point,AltosSiteMapTile>();  	Point2D.Double centre;  	private Point2D.Double tileCoordOffset(Point p) {  | 
