Skip to content

Instantly share code, notes, and snippets.

@comron
Created August 4, 2010 04:48
Show Gist options
  • Save comron/507657 to your computer and use it in GitHub Desktop.
Save comron/507657 to your computer and use it in GitHub Desktop.
do_calculation = proc {
do_some_blocking_stuff
}
EM.defer( do_calculation, proc { |results|
EM.schedule do
EventedMysql.execute(sql_for_results(results)) do
puts "done"
end
end
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment