[Lldb-commits] [lldb] [lldb/crashlog] Add `--no-parallel-image-loading` hidden flag (PR #94513)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 5 11:22:40 PDT 2024


================
@@ -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


More information about the lldb-commits mailing list