Skip to content

Instantly share code, notes, and snippets.

@farcaller
Created May 18, 2012 06:23
Show Gist options
  • Save farcaller/2723553 to your computer and use it in GitHub Desktop.
Save farcaller/2723553 to your computer and use it in GitHub Desktop.
def fetchEpisodes(&block)
Dispatch::Queue.concurrent.async do
episodes = fetchFromRSS()
Dispatch::Queue.main.sync do
block.call(episodes)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment