Skip to content

Instantly share code, notes, and snippets.

@brainopia
Created November 1, 2010 23:03
Show Gist options
  • Save brainopia/659025 to your computer and use it in GitHub Desktop.
Save brainopia/659025 to your computer and use it in GitHub Desktop.
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