Skip to content

Instantly share code, notes, and snippets.

@samleb
Created August 21, 2010 19:50
Show Gist options
  • Select an option

  • Save samleb/542772 to your computer and use it in GitHub Desktop.

Select an option

Save samleb/542772 to your computer and use it in GitHub Desktop.
FiberGroup.run do |g|
g.add { @geo = GeoIp.query(@ip) } unless params[:nogeo]
g.add { @hostname = reverse_dns(@ip).first } unless params[:noreverse]
end
# Control flow gets here when all above requests are complete, in parallel...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment