Пример #1
0
scheduler::scheduler(plasm_ptr p)
: plasm_(p)
, graph_(p->graph())
, io_svc_()
, state_(INIT)
, runners_(0)
{
  assert(plasm_);
#if !defined(_WIN32)
  // TODO (JTF): Move this somewhere else, and use sigaction(2) instead.
  signal(SIGINT, &sigint_static_thunk);
#endif
}
scheduler::scheduler(plasm_ptr p)
: plasm_(p)
, graph_(p->graph())
, io_svc_()
, state_(INIT)
, runners_(0)
, interrupt_connection(SINGLE_THREADED_SIGINT_SIGNAL.connect(boost::bind(&scheduler::interrupt, this)))
, interrupted(false)
{
  assert(plasm_);
#if !defined(_WIN32)
  // TODO (JTF): Move this somewhere else, and use sigaction(2) instead.
  signal(SIGINT, &sigint_static_thunk);
#endif
}