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

Fixes for command line tools 16 #2216

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/utils/watchdog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace kagome {
std::unique_lock lock{mutex_};
auto now = Clock::now();
for (auto it = threads_.begin(); it != threads_.end();) {
if (it->second.count.unique()) {
if (it->second.count.use_count() == 1) {
it = threads_.erase(it);
} else {
auto count = it->second.count->load();
Expand Down Expand Up @@ -130,7 +130,7 @@ namespace kagome {

void run(std::shared_ptr<boost::asio::io_context> io) {
auto ping = add();
while (not stopped_ and not io.unique()) {
while (not stopped_ and io.use_count() != 1) {
#define WAIT_FOR_BETTER_BOOST_IMPLEMENTATION
#ifndef WAIT_FOR_BETTER_BOOST_IMPLEMENTATION
// this is the desired implementation
Expand Down
Loading