         let taskID: Int
         let completionHandler: CompletionHandler
         let path: String
+        var iteration: Int = 0
+        
+        static let BASE_DELAY = 0.1     ///< Minimum wait delay.
+        static let MAX_DELAY  = 5.0     ///< Maximum wait delay.
         
         init(index: Index, taskID: Int, completionHandler: CompletionHandler) {
             self.index = index

            if cancelled {
                finish()
            }
            index.client.performHTTPQuery(path, method: .GET, body: nil, hostnames: index.client.writeHosts) {
                (content, error) -> Void in
                if let content = content {

                        }
                        self.finish()
                    } else {
                        // The delay between polls increases quadratically from the base delay up to the max delay.
                        let delay = min(WaitOperation.BASE_DELAY * Double(self.iteration * self.iteration), WaitOperation.MAX_DELAY)
                        NSThread.sleepForTimeInterval(delay)
                        self.startNext()
                    }
                } else {
