Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix thread leaks #1972

Merged
merged 30 commits into from
Feb 2, 2024
Merged

Fix thread leaks #1972

merged 30 commits into from
Feb 2, 2024

Conversation

xDimon
Copy link
Member

@xDimon xDimon commented Feb 2, 2024

Referenced issues

Fixes thread leaks

Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Copy link
Contributor

@turuslan turuslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will approve after:

  • Watchdog.stop()
  • ~PvfImpl()
  • ThreadPool()

Also made suggestion branch (+623 -405) master...suggest/1,
with less changes to ease understanding this PR,
(e.g. reverts renaming).

core/utils/thread_pool.hpp Outdated Show resolved Hide resolved
core/application/impl/kagome_application_impl.cpp Outdated Show resolved Hide resolved
size_t free_threads_;
const size_t max_tasks_;
std::deque<Task> tasks_;
ThreadPool thread_pool_;
std::shared_ptr<ThreadHandler> ocw_thread_handler_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::shared_ptr<ThreadHandler> ocw_thread_handler_;
WeakIoContext ocw_thread_;

core/parachain/pvf/pvf_impl.cpp Outdated Show resolved Hide resolved
core/utils/thread_handler.hpp Outdated Show resolved Hide resolved
xDimon and others added 5 commits February 2, 2024 11:18
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Co-authored-by: Ruslan Tushov <turuslan@users.noreply.github.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
@xDimon xDimon enabled auto-merge (squash) February 2, 2024 12:28
@xDimon xDimon merged commit 6468930 into master Feb 2, 2024
9 of 10 checks passed
@xDimon xDimon deleted the fix/thread_leaks branch February 2, 2024 12:41
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.

3 participants