If you move your mouse continually the query may not fail. Do not stop moving
iOS has a similar (some may say the opposite) problem, especially when setting up notification-based APIs and and app which expects a notification to happen within a certain period of time (ie a user needs their location now to complete an action, say a social post with location).  Sleeping won't work, nor will waiting on another thread work because there has to be activity on the main thread for the main runloop to execute.  What works is looping until timeout by sleeping for a few ms and then running the main thread's run loop explicitly.  Gross but it works.  Otherwise, the location notifications never arrive.  Such is the downside of cooperative multitasking.