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



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'ext/couchbase_ext/eventmachine_plugin.c', line 97

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



113
114
115
116
117
118
119
120
121
122
# File 'ext/couchbase_ext/eventmachine_plugin.c', line 113

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;
}