static VALUE t_initialize_event_machine (VALUE self)
{
    EmConnsHash = rb_ivar_get (EmModule, Intern_at_conns);
    EmTimersHash = rb_ivar_get (EmModule, Intern_at_timers);
    assert(EmConnsHash != Qnil);
    assert(EmTimersHash != Qnil);
    evma_initialize_library ((EMCallback)event_callback_wrapper);
    return Qnil;
}
Esempio n. 2
0
void EM::Run (void (*start_func)())
{
	evma__epoll();
	evma_initialize_library (EM::Callback);
	if (start_func)
		AddTimer (0, start_func);
	evma_run_machine();
	evma_release_library();
}
Esempio n. 3
0
static VALUE t_initialize_event_machine (VALUE self)
{
	evma_initialize_library (event_callback_wrapper);
	return Qnil;
}