Skip to content

Instantly share code, notes, and snippets.

@djoreilly
Created March 21, 2013 13:30
Show Gist options
  • Save djoreilly/5213012 to your computer and use it in GitHub Desktop.
Save djoreilly/5213012 to your computer and use it in GitHub Desktop.
import eventlet
q = eventlet.Queue()
def func1():
print "func1", q.get()
def func2():
print "func2", q.get()
waiton = (eventlet.spawn(func1), eventlet.spawn(func2))
q.put("hello")
q.put("world")
for w in waiton:
w.wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment