     
 }
 
+// MARK: - queues
+
+extension PositionLocationManager {
+    
+    internal func executeClosureAsyncOnMainQueueIfNecessary(withClosure closure: @escaping () -> Void) {
+        if Thread.isMainThread {
+            closure()
+        } else {
+            DispatchQueue.main.async(execute: closure)
+        }
+    }
+    
+    internal func executeClosureSyncOnMainQueueIfNecessary(withClosure closure: @escaping () -> Void) {
+        if Thread.isMainThread {
+            closure()
+        } else {
+            DispatchQueue.main.sync(execute: closure)
+        }
+    }
+    
+}
+
 // MARK: - PositionLocationRequest
 
 internal class PositionLocationRequest: NSObject {

            }
            
        } else {
            DispatchQueue.main.async(execute: {
                let error = NSError(domain: ErrorDomain, code: ErrorType.restricted.rawValue, userInfo: nil)
                completionHandler(nil, error)
            })
        }
    }
    

    
    // MARK - private methods
    
    // only called from the request queue
    internal func processLocationRequests() {
        if let locationRequests = self._locationRequests {
            guard
