[josm-dev] Modifying the thread pool size in the WMS plugin
Jeffrey Ollie
jeff at ocjtech.us
Mon Feb 8 04:03:57 GMT 2010
Would it be possible to have a preference option to modify the thread
pool size in the WMS plugin? I think that the patch below
accomplishes the task, but I don't have an environment set up to build
the plugin so that I can test it out. It'd be even better if the
thread pool size could be customized for each WMS layer, but I'm not
familiar enough with the code to figure that out. I don't want to
spam the various public servers with many more requests but I have a
private server that I can throw a lot more requests at.
diff --git a/src/wmsplugin/WMSLayer.java b/src/wmsplugin/WMSLayer.java
index f71754f..98dba45 100644
--- a/src/wmsplugin/WMSLayer.java
+++ b/src/wmsplugin/WMSLayer.java
@@ -80,7 +80,7 @@ public class WMSLayer extends Layer {
mv = Main.map.mapView;
pixelPerDegree = getPPD();
- executor = Executors.newFixedThreadPool(3);
+ executor =
Executors.newFixedThreadPool(Main.pref.getInteger("wmsplugin.threadpool.size",
3));
}
@Override
--
Jeff Ollie
More information about the josm-dev
mailing list