<commit_before>// #define ECTO_TRACE_EXCEPTIONS
#include <Python.h>
#define DISABLE_SHOW
#include <ecto/util.hpp>
#include <ecto/plasm.hpp>
#include <ecto/tendril.hpp>
#include <ecto/cell.hpp>

#include <string>
#include <map>
#include <set>
#include <utility>
#include <deque>

#include <ecto/graph_types.hpp>
#include <ecto/plasm.hpp>
#include <ecto/schedulers/invoke.hpp>
#include <ecto/schedulers/singlethreaded.hpp>

#include <boost/thread.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>


namespace ecto {

  using namespace ecto::graph;
  using boost::scoped_ptr;
  using boost::thread;
  using boost::bind;

  namespace schedulers {

    singlethreaded::singlethreaded(plasm::ptr p) 
      : plasm_(p), graph(p->graph()) 
    {       
      assert(plasm_);
    }

    singlethreaded::singlethreaded(plasm& p) 
      : plasm_(p.shared_from_this()), graph(plasm_->graph()) 
    {       
      assert(plasm_);
    }

    singlethreaded::~singlethreaded()
    {
      interrupt();
      wait();
    }
    int 
    singlethreaded::invoke_process(graph_t::vertex_descriptor vd)
    {
      int rv;
      try {
        rv = ecto::schedulers::invoke_process(graph, vd);
      } catch (const boost::thread_interrupted& e) {
        std::cout << "Interrupted\n";
      }
      return rv;<commit_msg>dont' forget to return teh quit<commit_after>// #define ECTO_TRACE_EXCEPTIONS
#include <Python.h>
#define DISABLE_SHOW
#include <ecto/util.hpp>
#include <ecto/plasm.hpp>
#include <ecto/tendril.hpp>
#include <ecto/cell.hpp>

#include <string>
#include <map>
#include <set>
#include <utility>
#include <deque>

#include <ecto/graph_types.hpp>
#include <ecto/plasm.hpp>
#include <ecto/schedulers/invoke.hpp>
#include <ecto/schedulers/singlethreaded.hpp>

#include <boost/thread.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>


namespace ecto {

  using namespace ecto::graph;
  using boost::scoped_ptr;
  using boost::thread;
  using boost::bind;

  namespace schedulers {

    singlethreaded::singlethreaded(plasm::ptr p) 
      : plasm_(p), graph(p->graph()) 
    {       
      assert(plasm_);
    }

    singlethreaded::singlethreaded(plasm& p) 
      : plasm_(p.shared_from_this()), graph(plasm_->graph()) 
    {       
      assert(plasm_);
    }

    singlethreaded::~singlethreaded()
    {
      interrupt();
      wait();
    }
    int 
    singlethreaded::invoke_process(graph_t::vertex_descriptor vd)
    {
      int rv;
      try {
        rv = ecto::schedulers::invoke_process(graph, vd);
      } catch (const boost::thread_interrupted& e) {
        std::cout << "Interrupted\n";
        return ecto::QUIT;
      }
      return rv;
{'fraction_non_alphanumeric': 0.1408245165997811, 'fraction_numerical': 0.0, 'mean_word_length': 3.4512987012987013, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '4995957', 'n_tokens_mistral': 1003, 'n_tokens_neox': 968, 'n_words': 170}