Skip to content

Instantly share code, notes, and snippets.

@djoreilly
Last active December 15, 2015 05:59
Show Gist options
  • Save djoreilly/5213086 to your computer and use it in GitHub Desktop.
Save djoreilly/5213086 to your computer and use it in GitHub Desktop.
import eventlet
def foo(name):
for i in range(3):
print "foo(%s): i=%d" % (name, i)
f1 = eventlet.spawn(foo, 'A')
f2 = eventlet.spawn(foo, 'B')
for i in range(3):
print "main: i=%d" % i
f1.wait()
f2.wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment