Reschedule parse jobs also when the parse queue is empty.

Authored by pprkut on Jul 14 2018, 4:08 PM.

Description

Reschedule parse jobs also when the parse queue is empty.

Summary:
I assume the original assumption here was that when the parse
queue is empty, scheduling another re-parse of the current file
doesn't make sense as we already have access to all parsed
declarations.

However, I don't think this assumption holds, especially in a
multi-core environment. The unit tests covering this code were
failing because the two test files were parsed at the same time,
resulting in the declarations being not yet available and the
parse queue being empty. Since the queue is empty, the testfile
is never scheduled to be parsed again, and the unresolved identifier
stays.

Reviewers: KDevelop, mwolff, kfunk, brauch

Reviewed By: KDevelop, brauch

Subscribers: brauch, kdevelop-devel

Tags: KDevelop

Differential Revision: https://phabricator.kde.org/D14113

Details