         dispatch_group_async(group, queue) {
             defer { self.signal() }
             self._result = block()
+        }
+        dispatch_group_notify(group, queue) {
+            self._lck.synchronized {
+                self._notify.forEach { $0() }
+                self._notify = []
+            }
         }
     }
     

    private let group: dispatch_group_t
    private let queue: dispatch_queue_t
    
    private var _result: Result! = nil
    
    private init(_ group: dispatch_group_t, _ queue: dispatch_queue_t) {
        self.group = group
        self.queue = queue
    }
    
    /// Create a SDTask and compute block with specific queue.

    
    /// Run `block` after `self` is completed with specific queue.
    public func complete<R>(queue: dispatch_queue_t, _ block: (Result) -> R) -> SDTask<R> {
        return _lck.synchronized {
            if completed {
                return SDTask<R>(queue) { block(self.result) }
            }
            let task = SDTask<R>(group, queue)
            _notify.append {
                dispatch_group_async(self.group, queue) {
                    defer { task.signal() }
                    task._result = block(self.result)
                }
            }
            return task
        }
    }
}
