Beispiel #1
0
int pony_init(int argc, char** argv)
{
  options_t opt;
  memset(&opt, 0, sizeof(options_t));

  // Defaults.
  opt.mpmcq = true;
  opt.cd_min_deferred = 4;
  opt.cd_max_deferred = 18;
  opt.cd_conf_group = 6;
  opt.gc_initial = 1 << 14;
  opt.gc_factor = 2.0f;

  argc = parse_opts(argc, argv, &opt);

#if defined(PLATFORM_IS_LINUX)
  pony_numa_init();
#endif

  heap_setinitialgc(opt.gc_initial);
  heap_setnextgcfactor(opt.gc_factor);

  pony_exitcode(0);
  scheduler_init(opt.threads, opt.noyield, opt.forcecd, opt.mpmcq);
  cycle_create(opt.cd_min_deferred, opt.cd_max_deferred, opt.cd_conf_group);

  return argc;
}
Beispiel #2
0
int pony_init(int argc, char** argv)
{
  options_t opt;
  memset(&opt, 0, sizeof(options_t));

  // Defaults.
  opt.cd_min_deferred = 4;
  opt.cd_max_deferred = 8;
  opt.cd_conf_group = 6;
  opt.gc_initial = 14;
  opt.gc_factor = 2.0f;

  argc = parse_opts(argc, argv, &opt);

#if defined(PLATFORM_IS_LINUX)
  ponyint_numa_init();
#endif

  ponyint_heap_setinitialgc(opt.gc_initial);
  ponyint_heap_setnextgcfactor(opt.gc_factor);
  ponyint_actor_setnoblock(opt.noblock);

  pony_exitcode(0);
  pony_ctx_t* ctx = ponyint_sched_init(opt.threads, opt.noyield);
  ponyint_cycle_create(ctx,
    opt.cd_min_deferred, opt.cd_max_deferred, opt.cd_conf_group);

  return argc;
}
Beispiel #3
0
int pony_init(int argc, char** argv)
{
  options_t opt;
  memset(&opt, 0, sizeof(options_t));
  opt.mpmcq = true;
  argc = parse_opts(argc, argv, &opt);

  pony_exitcode(0);
  scheduler_init(opt.threads, opt.forcecd, opt.mpmcq);
  cycle_create();

#if 0
  if(opt.distrib)
  {
    dist_create(opt.port, opt.child_count, opt.master);

    if(!opt.master)
      dist_join(opt.parent_host, opt.parent_port);
  }
#endif

  return argc;
}