<commit_before>#include "thread_context.hh"
#include <inttypes.h>

namespace ten {

namespace {
static std::atomic<uint64_t> taskidgen(0);
}

void task::set_default_stacksize(size_t stacksize) {
    CHECK(stacksize >= stack_allocator::min_stacksize);
    stack_allocator::default_stacksize = stacksize;
}

std::ostream &operator << (std::ostream &o, ptr<task::impl> t) {
    if (t) {
        o << "[" << (void*)t.get() << " " << t->get_id() << " "
          << t->getname() << " |" << t->getstate()
          << "| canceled: " << t->_canceled
          << " ready: " << t->_ready << "]";
    } else {
        o << "nulltask";
    }
    return o;
}

namespace this_task {<commit_msg>control init ordering for set_default_stacksize()<commit_after>#include "thread_context.hh"
#include <inttypes.h>

namespace ten {

namespace {
std::atomic<uint64_t> taskidgen(0);
}

void task::set_default_stacksize(size_t stacksize) {
    CHECK(stacksize >= stack_allocator::min_stacksize);

    (void)stack_allocator::initialize(); // ensure static init done
    stack_allocator::default_stacksize = stacksize;
}

std::ostream &operator << (std::ostream &o, ptr<task::impl> t) {
    if (t) {
        o << "[" << (void*)t.get() << " " << t->get_id() << " "
          << t->getname() << " |" << t->getstate()
          << "| canceled: " << t->_canceled
          << " ready: " << t->_ready << "]";
    } else {
        o << "nulltask";
    }
    return o;
}

namespace this_task {
{'fraction_non_alphanumeric': 0.19493844049247605, 'fraction_numerical': 0.004103967168262654, 'mean_word_length': 3.2405797101449276, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 21, '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': '1617055', 'n_tokens_mistral': 514, 'n_tokens_neox': 510, 'n_words': 90}