Created
November 1, 2010 23:03
-
-
Save brainopia/659025 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Driver | |
def execute(sql) | |
fiber = Fiber.current | |
evented_execute(sql) { fiber.resume } | |
fiber.yield | |
end | |
end | |
pool = FiberPool.new 10 | |
pool.spawn do | |
execute some_sql | |
puts 'oh yeah, it looks synchronous' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment