<commit_before>#include "ltl/task_queue.hpp"
#include "ltl/await.hpp"

#include "ltlcontext/ltlcontext.hpp"

#include <stdio.h>
#include <string>

#include <unistd.h>

std::mutex m;
bool finished = false;
std::condition_variable cv;

ltl::task_queue mainQueue("main");
ltl::task_queue otherQueue("other");

namespace {
    
    
std::string get_string()
{
    printf("get_string \n");
    return std::string("get_string");
}

void print(std::string const& str)
{
    printf("print %s\n", str.c_str());
    
}
    
#define LTL_ASYNC(tq) |= tq <<= [&]()

void new_main()
{
    for (int i = 0; i < 1000; ++i)

    {
        std::string const str = ltl::await(otherQueue.execute(get_string));
        ltl::await (otherQueue.execute([=](){ print(str); }));
    }

    ltl::await(otherQueue.execute([&](){
        std::unique_lock<std::mutex> lock(m);
        finished = true;
        cv.notify_one();
    }));
}
    
} // namespace

int main(int argc, char** argv)
{
    {
        mainQueue.enqueue(&new_main);
        
        std::unique_lock<std::mutex> lock(m);
        cv.wait(lock, [&](){ return finished; });
    }
    
    usleep(1000000);
    
    otherQueue.join();<commit_msg>Minor changes to test<commit_after>#include "ltl/task_queue.hpp"
#include "ltl/await.hpp"

#include "ltlcontext/ltlcontext.hpp"

#include <stdio.h>
#include <string>

#include <unistd.h>

std::mutex m;
int finished = 0;
std::condition_variable cv;

ltl::task_queue mainQueue("main");
ltl::task_queue otherQueue("other");

namespace {
    
    
std::string get_string()
{
    printf("get_string \n");
    return std::string("get_string");
}

void print(std::string const& str)
{
    printf("print %s\n", str.c_str());
    
}

void new_main()
{
    for (int i = 0; i < 1000; ++i)

    {
        std::string const str = ltl::await(otherQueue.execute(get_string));
        ltl::await (otherQueue.execute([=](){ print(str); }));
    }

    ltl::await(otherQueue.execute([&](){
        std::unique_lock<std::mutex> lock(m);
        ++finished;
        cv.notify_one();
    }));
}
    
} // namespace

int main(int argc, char** argv)
{
    {
        mainQueue.enqueue(&new_main);
        mainQueue.enqueue(&new_main);
        mainQueue.enqueue(&new_main);
        
        std::unique_lock<std::mutex> lock(m);
        cv.wait(lock, [&](){ return finished == 3; });
    }
    
    usleep(1000000);
    
    otherQueue.join();
{'fraction_non_alphanumeric': 0.18333333333333332, 'fraction_numerical': 0.010833333333333334, 'mean_word_length': 3.076400679117148, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 13, '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': '2438397', 'n_tokens_mistral': 896, 'n_tokens_neox': 879, 'n_words': 153}