<commit_before>#include <bitcoin/utility/threads.hpp>

namespace libbitcoin {

void run_service(service_ptr service)
{
    service->run();
}

thread_core::thread_core()
{
    service_ = std::make_shared<io_service>();
    // use std::ref here
    work_ = std::make_shared<io_service::work>(std::ref(*service_));
    runner_ = std::thread(run_service, service_);
}

thread_core::~thread_core()
{
    service_->stop();
    runner_.join();
}

service_ptr thread_core::service()
{
    return service_;
}

strand_ptr thread_core::create_strand()
{
    return std::make_shared<io_service::strand>(*service_);
}

threaded_service::threaded_service()
  : strand_(core_.create_strand())
{
}

service_ptr threaded_service::service()
{
    return core_.service();
}

strand_ptr threaded_service::strand()
{
    return strand_;
}

} // libbitcoin

<commit_msg>concurrency hint for boost io_servie (1)<commit_after>#include <bitcoin/utility/threads.hpp>

namespace libbitcoin {

void run_service(service_ptr service)
{
    service->run();
}

thread_core::thread_core()
{
    service_ = std::make_shared<io_service>(1);
    // use std::ref here
    work_ = std::make_shared<io_service::work>(std::ref(*service_));
    runner_ = std::thread(run_service, service_);
}

thread_core::~thread_core()
{
    service_->stop();
    runner_.join();
}

service_ptr thread_core::service()
{
    return service_;
}

strand_ptr thread_core::create_strand()
{
    return std::make_shared<io_service::strand>(*service_);
}

threaded_service::threaded_service()
  : strand_(core_.create_strand())
{
}

service_ptr threaded_service::service()
{
    return core_.service();
}

strand_ptr threaded_service::strand()
{
    return strand_;
}

} // libbitcoin


{'fraction_non_alphanumeric': 0.1519721577726218, 'fraction_numerical': 0.001160092807424594, 'mean_word_length': 5.295620437956204, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6924824', 'n_tokens_mistral': 604, 'n_tokens_neox': 583, 'n_words': 87}