<commit_before>#include "signal.hpp"


namespace dafs
{
    Signal::Signal()
    {
        flag = false;
    }

    void
    Signal::Set()
    {
        flag = true;
        condition.notify_one();
    }

    void
    Signal::Wait()
    {
        std::unique_lock<std::mutex> lock(mutex);
        condition.wait(lock, [&] { return flag; });
    }<commit_msg>Fix signal wait<commit_after>#include "signal.hpp"


namespace dafs
{
    Signal::Signal()
    {
        flag = false;
    }

    void
    Signal::Set()
    {
        flag = true;
        condition.notify_one();
    }

    void
    Signal::Wait()
    {
        std::unique_lock<std::mutex> lock(mutex);
        condition.wait(lock, [&] { return flag; });
        flag = false;
    }
{'fraction_non_alphanumeric': 0.14864864864864866, 'fraction_numerical': 0.0, 'mean_word_length': 1.89453125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2043424', 'n_tokens_mistral': 253, 'n_tokens_neox': 241, 'n_words': 42}