Skip to content

Stop io_context before joining threads in ThreadPool destructor#227

Merged
alanw merged 1 commit intoluceneplusplus:masterfrom
hhoffstaette:threadpool-shutdown
Apr 27, 2026
Merged

Stop io_context before joining threads in ThreadPool destructor#227
alanw merged 1 commit intoluceneplusplus:masterfrom
hhoffstaette:threadpool-shutdown

Conversation

@hhoffstaette
Copy link
Copy Markdown
Contributor

While trying to verify tests previously excluded in Gentoo (gentoo/gentoo@b9d1c7a) I noticed that ParallelMultiSearcherTest & SortTest would work, but hang in ~ThreadPool() on threadGroup.join_all(), preventing the test executable from terminating cleanly.
Stopping the io_context makes join_all() work immediately.

While trying to verify tests previously excluded in Gentoo
(gentoo/gentoo@b9d1c7a)
I noticed that ParallelMultiSearcherTest & SortTest would work, but
hang in ~ThreadPool() on threadGroup.join_all(), preventing the
test executable from terminating cleanly.
Stopping the io_context makes join_all() work immediately.
@alanw alanw merged commit 5448b3d into luceneplusplus:master Apr 27, 2026
@hhoffstaette hhoffstaette deleted the threadpool-shutdown branch April 27, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants