Hi, in my app I have two concurrent asynchronous API calls. I want to act on whichever call completes first (either memcache or datastore).
What's the best way to wait on a result without burning CPU cycles? Currently I'm checking periodically and call Thread.yield() on every round.
Since I'm not blocking on a synchronous API call, does the wall-clock-time waiting there still count against my "Runtime MCycles"?
Will it make a difference in terms of "Runtime MCycles" if I try to save real CPU cycles or could I just as well be using a simple loop to wait on one of the calls to complete?
I assume that in contrast time spent waiting on synchronous API calls does not count towards my "Runtime MCycles". Am I correct here?
Besides latency - will "Runtime MCycles" affect the way the scheduler treats my app at all? (the number of concurrent request per instance maybe?)
Wolfram