From 52aef33f953b5864dc015448783ecd2d9415e52f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 29 Apr 2025 07:22:25 -0600 Subject: 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 --- tools/patman/patchwork.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/patman/patchwork.py') diff --git a/tools/patman/patchwork.py b/tools/patman/patchwork.py index 2b7734bbfe4..47d7be28fdf 100644 --- a/tools/patman/patchwork.py +++ b/tools/patman/patchwork.py @@ -139,7 +139,7 @@ class Review: 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 @@ class Patchwork: 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): -- cgit v1.2.3