Sha256: 6ccfa0724bd13f0e24ebf1c391632539284194d7b4bc687f017b8102fbcd9ef5
Contents?: true
Size: 335 Bytes
Versions: 2
Compression:
Stored size: 335 Bytes
Contents
require "em-mysqlplus" module EventMachine class MySQL alias :aquery :query def query(sql, &blk) f = Fiber.current # TODO: blk case does not work. Hmm? cb = Proc.new { |r| f.resume(r) } eb = Proc.new { |r| f.resume(r) } @connection.execute(sql, cb, eb) Fiber.yield end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
em-synchrony-0.1.4 | lib/em-synchrony/em-mysql.rb |
em-synchrony-0.1.2 | lib/em-synchrony/em-mysql.rb |