Class: RethinkDB::EMHandler
- Inherits:
-
AsyncHandler
- Object
- AsyncHandler
- RethinkDB::EMHandler
- Defined in:
- lib/nobrainer_streams/rethinkdb_monkeypatch.rb
Overview
AsyncHandler that uses EventMachine to dispatch events
Instance Attribute Summary
Attributes inherited from AsyncHandler
#callback, #connection, #options
Instance Method Summary collapse
Instance Method Details
#handler ⇒ Object
36 37 38 |
# File 'lib/nobrainer_streams/rethinkdb_monkeypatch.rb', line 36 def handler callback end |
#run ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/nobrainer_streams/rethinkdb_monkeypatch.rb', line 26 def run if !EM.reactor_running? raise RuntimeError, "RethinkDB::RQL::em_run can only be called inside `EM.run`" end EM_Guard.register(connection) [:query_handle_class] = EMQueryHandle yield end |