Skip to content

Instantly share code, notes, and snippets.

/py_version.pyx Secret

Created May 8, 2014 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/e531394bbda389e4990f to your computer and use it in GitHub Desktop.
Save anonymous/e531394bbda389e4990f to your computer and use it in GitHub Desktop.
from gevent.pool import Pool
def demo():
cdef int SIZE = 655350
pool = Pool(SIZE)
def incr(int n):
print n+1
for i from 0<=i<SIZE:
# pool.wait_available()
pool.spawn(incr, i)
pool.join()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment