public function finished()
    {
        if ($this->tasksCount == 0) {
            if (isset($this->callback)) {
                $results = array();
                foreach ($this->tasks as $task) {
                    $results[] = $task->result;
                }

                call_user_func($this->callback, $results);
            }

            return true;
        }

        return false;
    }
public function finished()
    {
        if ($this->tasksCount == 0) {
            if (isset($this->callback)) {
                $results = array();
                foreach ($this->tasks as $task) {
                    $results[] = $task->result;
                }

                call_user_func($this->callback, $results);
            }

            return true;
        }

        return false;
    }
public function finished ( ) { if ( $ this -> tasksCount == 0 ) { if ( isset ( $ this -> callback ) ) { $ results = array ( ) ; foreach ( $ this -> tasks as $ task ) { $ results [ ] = $ task -> result ; } call_user_func ( $ this -> callback , $ results ) ; } return true ; } return false ; }
Is this set finished running?

This function will return true if all of the tasks in the set have
finished running. If they have we also run the set callbacks if there
is one.

@return bool
Is this set finished running?