================
@@ -555,30 +555,44 @@ def load_images(self, options, loaded_images=None):
 
         futures = []
         with tempfile.TemporaryDirectory() as obj_dir:
-            with concurrent.futures.ThreadPoolExecutor() as executor:
 
-                def add_module(image, target, obj_dir):
-                    return image, image.add_module(target, obj_dir)
+            def add_module(image, target, obj_dir):
+                return image, image.add_module(target, obj_dir)
+
+            if options.parallel_image_loading:
+                with concurrent.futures.ThreadPoolExecutor() as executor:
----------------
JDevlieghere wrote:

Instead of duplicating the code, I would limit the number of workers in the 
ThreadPool to one.  

https://github.com/llvm/llvm-project/pull/94513
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to