patman: Provide an option to run in single-threaded mode

Patman normally sends multiple concurrent requests to the patchwork
server, as this is faster. Provide an option to disable this.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/patman/patchwork.py b/tools/patman/patchwork.py
index 2b7734b..47d7be2 100644
--- a/tools/patman/patchwork.py
+++ b/tools/patman/patchwork.py
@@ -139,7 +139,7 @@
 class Patchwork:
     """Class to handle communication with patchwork
     """
-    def __init__(self, url, show_progress=True):
+    def __init__(self, url, show_progress=True, single_thread=False):
         """Set up a new patchwork handler
 
         Args:
@@ -151,7 +151,8 @@
         self.proj_id = None
         self.link_name = None
         self._show_progress = show_progress
-        self.semaphore = asyncio.Semaphore(MAX_CONCURRENT)
+        self.semaphore = asyncio.Semaphore(
+            1 if single_thread else MAX_CONCURRENT)
         self.request_count = 0
 
     async def _request(self, client, subpath):