from time import sleep
from google.appengine.ext import ndb
@ndb.tasklet
def do_some(time):
yield ndb.sleep(time)
raise ndb.Return(time)
@ndb.tasklet
def foo():
a, b = yield (do_some(3), do_some(3))
raise ndb.Return(a + b)
def main():
f = foo()
x = f.get_result()
print x
main() #Execution time is 3 not 6
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)