<commit_before>#include <PosixThread.h>
#include <FWPlatform.h>
#include <Runnable.h>

#include <iostream>

using namespace std;

bool
PosixThread::start() {
  if (pthread_create(&thread, NULL, PosixThread::entryPoint, this) == 0) {
    return true;
  } else {
    cerr << "failed to create thread\n";
    return false;
  }
}

void
PosixThread::sendEventFromThread(const Event & ev) {
  getPlatform().pushEvent(ev);
}

void *
PosixThread::entryPoint(void * pthis) {
  PosixThread * pt = static_cast<PosixThread*>(pthis);
  pt->thread_id = pthread_self();

  pt->getRunnable().start(pt);
  pthread_exit(0);
  
  return 0;
}<commit_msg>modify debug print<commit_after>#include <PosixThread.h>
#include <FWPlatform.h>
#include <Runnable.h>

#include <iostream>

using namespace std;

bool
PosixThread::start() {
  int r = pthread_create(&thread, NULL, PosixThread::entryPoint, this);
  if (r == 0) {
    return true;
  } else {
    cerr << "failed to create thread: " << r << "\n";
    return false;
  }
}

void
PosixThread::sendEventFromThread(const Event & ev) {
  getPlatform().pushEvent(ev);
}

void *
PosixThread::entryPoint(void * pthis) {
  PosixThread * pt = static_cast<PosixThread*>(pthis);
  pt->thread_id = pthread_self();

  pt->getRunnable().start(pt);
  pthread_exit(0);
  
  return 0;
}
{'fraction_non_alphanumeric': 0.15473441108545036, 'fraction_numerical': 0.004618937644341801, 'mean_word_length': 4.555555555555555, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 17, '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': '766700', 'n_tokens_mistral': 485, 'n_tokens_neox': 473, 'n_words': 99}