 
         private var syncTimer: NSTimer? = nil
 
+        /**
+         * Locking is managed by withSyncInputs. Make sure you take and release these
+         * whenever you do anything Sync-ey.
+         */
+        var syncLock = OSSpinLock()
+
+        private func beginSyncing() -> Bool {
+            return OSSpinLockTry(&syncLock)
+        }
+
+        private func endSyncing() {
+            return OSSpinLockUnlock(&syncLock)
+        }
+
         init(profile: BrowserProfile) {
             self.profile = profile
         }

         */
        private func withSyncInputs<T>(label: EngineIdentifier? = nil, function: (SyncDelegate, Prefs, Ready) -> Deferred<Result<T>>) -> Deferred<Result<T>>? {
            if let account = profile.account {
                if let label = label {
                    log.info("Syncing \(label).")
                }

        }
    }
}

class AlreadySyncingError: ErrorType {
    var description: String {
        return "Already syncing."
    }
}
