[PATCH] D126815: [llvm] [Support] [Debuginfod] waitQueueSize for ThreadPool

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 16:55:05 PDT 2022


mysterymath added a comment.

In D126815#3568630 <https://reviews.llvm.org/D126815#3568630>, @noajshu wrote:

> I agree with @mysterymath there is more than one way to support this usage pattern and I also agree with @mehdi_amini that the user code could keep track on its own.
> It seems like this ought to be a common scenario, that there should be an unbounded number of files ( / modules / sections / etc.) to be processed, but bounded memory. User code will be slightly simpler if `ThreadPool` provides a standard API to handle such cases.
>
> I suppose another direction would be to abandon the producer-consumer model altogether. In D114845 <https://reviews.llvm.org/D114845>, this could be done (in part) by letting the threads share access to the `recursive_directory_iterator`, acquiring a lock then advancing it on their own to harvest jobs from the filesystem.

I like that; it should decouple those commits from this one, and it should be quite a bit cleaner than maintaining size counters.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126815/new/

https://reviews.llvm.org/D126815



More information about the llvm-commits mailing list