                 self._error = error
             }
             
-            // TODO: notify
-            
+            // wake up all waiting thread by waitUntilCompleted()
+            self._completeCondition.lock()
+            self._completeCondition.broadcast()
+            self._completeCondition.unlock()
+
+            // execute all coninuations
             for callback in self._continuations {
                 callback()
             }

        return task
    }
    
}

// suppose it is used in this way


    let _lock = NSObject()
    var _completed: Bool = false
    let _completeCondition: NSCondition = NSCondition()
    var _result: Any? = nil
    var _error: HNTaskError? = nil
    var _continuations: (() -> Void)[] = []
