em-synchrony 0.3.0.beta.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,27 +0,0 @@
1
- begin
2
- require "mysqlplus"
3
- require "em-mysqlplus"
4
- rescue LoadError => error
5
- raise "Missing EM-Synchrony dependency: gem install mysqlplus, gem install em-mysqlplus"
6
- end
7
-
8
- module EventMachine
9
- class MySQL
10
-
11
- alias :aquery :query
12
- def query(sql, &blk)
13
- f = Fiber.current
14
-
15
- # TODO: blk case does not work. Hmm?
16
- cb = Proc.new { |r| f.resume(r) }
17
- eb = Proc.new { |r| f.resume(r) }
18
-
19
- @connection.execute(sql, cb, eb)
20
-
21
- result = Fiber.yield
22
- raise result if Mysql::Error == result.class
23
- result
24
- end
25
-
26
- end
27
- end