inter thread communication in Objective C(iPhone),
<p>I want to get the current location using CLLocationManager, but synchronously. I want to convert this asynchronous call to a synchronous call. basically i just want my code to do nothing when i call for location and then proceed further after getting a valid location. how much time will it take is not a problem. Now I tried using NSRunLoop and NSCondition but the problem i Faced is that when i call for location from a different thread and call a wait on main thread, The main thread stucks then and there only and it is not receiving any notification from my background thread from which I called for Location. Now what I understood from this is that I need to do inter thread communication to get the response in main thread from background thread. So, how to I achieve this? Any pointers will be really helpful or anyone has a better way to do it, Please tell</p>

<p>Thank in advance.</p>
