Advertisement
Guest User

Untitled

a guest
Jul 1st, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. ################
  2. # FUTURE TOOLS
  3. ################
  4. # each function accepts a list of Futures
  5.  
  6. def wait_all(futures):
  7. ndb.Future.wait_all(futures)
  8.  
  9.  
  10. def wait_each(futures):
  11. while futures:
  12. future = ndb.Future.wait_any(futures)
  13. futures.remove(future)
  14. yield future
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement