Making asyncronous call synchronous in Python
<p>What is the best way to make an asynchronous call appear synchronous?  Eg, something like this, but how do I coordinate the calling thread and the async reply thread?  In java I might use a CountdownLatch() with a timeout, but I can't find a definite solution for Python</p>

<pre><code>def getDataFromAsyncSource():
    asyncService.subscribe(callback=functionToCallbackTo)
    # wait for data
    return dataReturned

def functionToCallbackTo(data):
    dataReturned = data
</code></pre>
