Implement a thread pool
authorChristian Biesinger <cbiesinger@google.com>
Tue, 1 Oct 2019 23:38:35 +0000 (18:38 -0500)
committerTom Tromey <tom@tromey.com>
Tue, 26 Nov 2019 21:02:57 +0000 (14:02 -0700)
commita0b57563b1317e0000a67a7bed4c1712403682f3
tree3a04ba4f878ec9d8dbfb03fd7a5fd345d8033fc9
parent3b3978bca2a204a772563c8e121e4a02be72e802
Implement a thread pool

This adds a simple thread pool to gdb.  In the end, this seemed
preferable to the approach taken in an earlier version of this series;
namely, starting threads in the parallel-foreach implementation.  This
approach reduces the overhead of starting new threads, and also lets
the user control (in a subsequent patch) exactly how many worker
threads are running.

gdb/ChangeLog
2019-11-26  Christian Biesinger  <cbiesinger@google.com>
    Tom Tromey  <tom@tromey.com>

* gdbsupport/thread-pool.h: New file.
* gdbsupport/thread-pool.c: New file.
* Makefile.in (COMMON_SFILES): Add thread-pool.c.
(HFILES_NO_SRCDIR): Add thread-pool.h.

Change-Id: I597bb642780cb9d578ca92373d2a638efb44fe52
gdb/ChangeLog
gdb/Makefile.in
gdb/gdbsupport/thread-pool.c [new file with mode: 0644]
gdb/gdbsupport/thread-pool.h [new file with mode: 0644]