This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[review] Implement a thread pool
- From: "Christian Biesinger (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Christian Biesinger <cbiesinger at google dot com>, Tom Tromey <tromey at sourceware dot org>, gdb-patches at sourceware dot org
- Date: Sun, 20 Oct 2019 05:55:17 -0400
- Subject: [review] Implement a thread pool
- Auto-submitted: auto-generated
- References: <gerrit.1571543710000.I597bb642780cb9d578ca92373d2a638efb44fe52@gnutoolchain-gerrit.osci.io>
- Reply-to: cbiesinger at google dot com, tromey at sourceware dot org, cbiesinger at google dot com, gdb-patches at sourceware dot org
Christian Biesinger has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/172
......................................................................
Patch Set 1:
(1 comment)
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/172/1/gdb/gdbsupport/thread-pool.h
File gdb/gdbsupport/thread-pool.h:
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/172/1/gdb/gdbsupport/thread-pool.h@80
PS1, Line 80: std::queue<task> m_tasks;
I would still argue that at least the queue should be heap-allocated/leaked as well, so that the background threads do not access freed memory when gdb exits and the main thread destructs the threadpool. Does this not cause an address sanitizer error for you?