Skip to content

Instantly share code, notes, and snippets.

@bcg
Created September 1, 2011 12:54
Show Gist options
  • Save bcg/1186106 to your computer and use it in GitHub Desktop.
Save bcg/1186106 to your computer and use it in GitHub Desktop.
EM Loop
items = [1,2,3]
(looper = proc {
item = items.pop
if item
...
EM.next_tick(looper)
end
}).call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment