Files
bitcoin/src
furszy 8cd4a4363f threadpool: guard against Start-Stop race
Stop() has two windows where Start() could cause troubles:

1) m_workers is temporarily empty while workers are being joined,
this creates a window where Start() could slip through and reset
m_interrupt to false, preventing the old workers from exiting and
causing a deadlock.

2) Start() could be called after workers are joined but before the
empty() sanity check on m_work_queue, causing a crash.

Fix both races by keeping m_interrupt set for the entire duration
of Stop(), so any concurrent Start() call is rejected until all
workers have exited.

Co-authored-by: Hodlinator <172445034+hodlinator@users.noreply.github.com>
2026-02-24 19:18:31 -03:00
..
2026-02-20 16:49:52 +01:00
2026-02-20 16:49:52 +01:00
2026-02-03 11:19:01 +01:00
2026-02-17 21:40:46 +05:30
2026-01-22 10:35:14 -05:00
2026-02-02 17:22:31 +00:00