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-09 15:55:58 -05:00
2026-02-19 16:57:54 -08:00
2026-01-22 12:39:52 +01:00
2026-02-02 19:32:14 +01:00
2026-01-30 11:50:17 +00:00
2026-02-20 15:58:48 -08:00
2026-01-27 13:08:50 +01:00
2026-02-20 16:49:52 +01:00
2026-02-20 16:49:52 +01:00
2026-02-13 11:11:14 +00:00
2026-02-03 11:19:01 +01:00
2026-02-02 17:22:31 +00:00
2026-02-24 06:54:17 -05:00
2026-02-20 11:06:06 +01:00
2026-02-09 15:55:58 -05:00
2026-02-20 10:31:10 +00:00
2026-02-24 06:54:17 -05:00
2026-02-21 12:18:56 +01:00
2026-02-02 15:21:14 +00:00
2026-02-13 08:50:50 +01:00
2026-02-24 19:18:31 -03:00
2026-01-31 10:41:50 +00:00
2026-02-24 19:18:31 -03:00
2026-02-21 12:18:56 +01:00
2026-01-29 14:38:35 +00:00
2026-01-29 14:38:35 +00:00
2026-02-06 08:37:19 +01:00
2026-01-20 23:45:29 +01:00
2026-01-21 19:40:25 +05:30
2026-02-13 10:52:25 +01:00
2026-01-19 20:20:13 +01:00
2026-02-17 21:40:46 +05:30
2026-02-02 17:22:31 +00:00
2026-02-17 09:04:36 -05:00
2026-02-20 09:27:17 +01:00
2026-02-19 22:10:41 -05:00
2026-02-19 22:10:41 -05:00
2026-02-09 13:32:28 +00:00
2026-01-19 12:57:16 +01:00
2026-02-02 17:22:31 +00:00
2026-02-02 18:42:44 +01:00
2026-02-13 10:52:25 +01:00
2026-02-17 12:55:26 +01:00
2026-02-17 12:55:26 +01:00
2026-02-02 17:22:31 +00:00
2026-02-19 12:41:12 -08:00
2026-01-30 16:17:12 -05:00
2026-02-20 15:58:48 -08:00
2026-02-02 17:22:31 +00:00
2026-02-02 17:22:31 +00:00
2026-02-11 19:46:19 -05:00
2026-02-11 19:46:19 -05:00
2026-02-06 18:00:18 -08:00
2026-02-13 11:17:26 +00:00
2026-01-22 10:35:14 -05:00
2026-01-23 13:25:42 +01:00
2026-01-20 23:59:41 +01:00
2026-01-20 23:59:41 +01:00
2026-02-11 19:46:12 -05:00
2026-02-11 19:46:12 -05:00
2026-02-06 07:56:57 +01:00
2026-02-02 17:22:31 +00:00
2026-02-09 13:32:28 +00:00
2026-02-02 17:55:10 +01:00
2026-02-02 17:22:31 +00:00
2026-02-07 23:01:17 +01:00
2026-02-02 17:22:31 +00:00
2026-02-02 17:22:31 +00:00
2026-01-20 15:30:46 +01:00
2026-02-08 08:23:37 +01:00
2026-02-09 15:55:58 -05:00
2026-02-09 15:55:58 -05:00
2026-02-20 09:19:24 -05:00
2026-01-22 21:51:13 -05:00
2026-02-20 16:49:15 +01:00
2026-02-20 16:49:15 +01:00
2026-02-02 17:22:31 +00:00