Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/Command.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/Command.java	(revision 29818)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/Command.java	(revision 29819)
@@ -26,6 +26,7 @@
     public int currentParameterNum;
     public boolean tracks;
-
-    public Command () {	parameters = new ArrayList<Parameter>(); optParameters = new ArrayList<Parameter>(); currentParameterNum = 0; tracks = false; icon = ""; }
+    public boolean asynchronous;
+
+    public Command () {	parameters = new ArrayList<Parameter>(); optParameters = new ArrayList<Parameter>(); currentParameterNum = 0; tracks = false; asynchronous = false; icon = ""; }
 
     public boolean loadObject(Object obj) {
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 29818)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 29819)
@@ -558,4 +558,10 @@
                 }
                 Utils.close(osmWriter);
+                synchronized (syncObj) {
+                    if (currentCommand.asynchronous) {
+                        tp.running = false;
+                        syncObj.notifyAll();
+                    }
+                }
             }
         });
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/Loader.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/Loader.java	(revision 29818)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/Loader.java	(revision 29819)
@@ -85,7 +85,8 @@
 					if (Value.equals("bbox"))
 						currentCommand.tracks = true;
-				}
-				else if (Name.equals("icon")) {
+				} else if (Name.equals("icon")) {
 					currentCommand.icon = Value;
+				} else if (Name.equals("asynchronous")) {
+					currentCommand.asynchronous = Value.equals("true") ? true : false;
 				}
 			}
@@ -126,5 +127,5 @@
 	}
 
-        @Override
+	@Override
 	public void characters(char ch[], int start, int length) 
 	{
@@ -167,18 +168,18 @@
 	}
 
-        @Override
+	@Override
 	public void warning(SAXParseException ex) {
-	  System.err.println("Warning in command xml file " + currentFile + ": " + ex.getMessage());
+		System.err.println("Warning in command xml file " + currentFile + ": " + ex.getMessage());
 	}
 
-        @Override
+	@Override
 	public void error(SAXParseException ex) {
-	  System.err.println("Error in command xml file " + currentFile + ": " + ex.getMessage());
+		System.err.println("Error in command xml file " + currentFile + ": " + ex.getMessage());
 	}
 
-        @Override
+	@Override
 	public void fatalError(SAXParseException ex) throws SAXException {
-	  System.err.println("Error in command xml file " + currentFile + ": " + ex.getMessage());
-	  throw ex;
+		System.err.println("Error in command xml file " + currentFile + ": " + ex.getMessage());
+		throw ex;
 	}
 }
