Class: Couchbase::EM::Event

Inherits:
Object
  • Object
show all
Defined in:
ext/couchbase_ext/eventmachine_plugin.c

Instance Method Summary collapse

Instance Method Details

#callObject



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'ext/couchbase_ext/eventmachine_plugin.c', line 94

static VALUE
rb_em_event_call(VALUE self)
{
    rb_em_event *ev;
    Data_Get_Struct(self, rb_em_event, ev);

    ev->holder = 0;
    rb_em_event_run_callback(ev, 0);

    if (!ev->canceled && !ev->holder) {
        ev->holder = rb_funcall_2(em_m, cb_id_add_timer, rb_float_new((double)ev->usec / 1.0e6), self);
    }

    return Qnil;
}

#clear_holderObject



110
111
112
113
114
115
116
117
118
119
# File 'ext/couchbase_ext/eventmachine_plugin.c', line 110

static VALUE
rb_em_event_clear_holder(VALUE self)
{
    rb_em_event *ev;
    Data_Get_Struct(self, rb_em_event, ev);

    ev->holder = 0;

    return Qnil;
}