On Thu, Nov 1, 2012 at 9:38 AM, ckhan <[email protected]> wrote:
> So sorry, I botched my example. Let me try again: munch_stuff is
> explicitly *not* a tasklet (no decorator), but 'munch' is,
> and I call it with Future's wait_all function:
>
>       def munch_stuff():
>           # synchronously fetch some entities
>           stuff = ndb.get_multi(...)
>
>           # process each concurrently with munch tasklet
>           ndb.Future.wait_all([munch(s) for s in stuff])
>
> Would this construct still be safe re the rule against mixing
> sync/async, but let me "munch" concurrently?

This example looks fine -- however if you were to call much_stuff()
from a tasklet, you'd be in trouble again.

> Thanks so much taking the time to answer these questions;
> extremely helpful and greatly appreciated.

You're welcome.

-- 
--Guido van Rossum (python.org/~guido)

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to