Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display showing more projects than the ones actually active #367

Merged
merged 1 commit into from Mar 5, 2021

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Feb 23, 2021

No description provided.

@@ -430,7 +430,7 @@ private void cancelNow() {
private void handle(DaemonConnection connection, BuildRequest buildRequest) {
updateState(Busy);
final BlockingQueue<Message> sendQueue = new PriorityBlockingQueue<>(64,
Comparator.comparingInt(this::getClassOrder).thenComparingLong(Message::timestamp));
Copy link
Contributor

@ppalaga ppalaga Feb 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you really wanted to remove getClassOrder from the comparator, then the getClassOrder() method can be removed too.
And we perhaps also do not need a PriorityBlockingQueue anymore.

@@ -279,8 +281,8 @@ private boolean doAccept(Message entry) {
Project prj = projects.remove(artifactId);
if (prj != null) {
prj.log.forEach(log);
doneProjects.add(artifactId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need doneProjects set? Under which circumstances would deliver a different count than the original int doneProjects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants