Skip to content

Problem with RateLimitingProgressMonitor #1358

@snjeza

Description

@snjeza

The related issue - redhat-developer/vscode-java#4292

RateLimitingProgressMonitor is created when a tooling action is executed -

IProgressMonitor efficientMonitor = new RateLimitingProgressMonitor(monitor, 500, TimeUnit.MILLISECONDS);

This monitor creates a timer that would need to be canceled in the done method.
However, the done method is never called.

Steps to reproduce:

  • import spring-petclinic into Eclipse, VS Code or Cursor
  • call jstack -l <jvm_process_pid>

You will see 10+ Timer threads.
They call the forwardMostRecentMessage method every 500ms - https://github.com/eclipse-buildship/buildship/blob/218322a0d994543cf0aec77def05e6feeddd4b95/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/util/progress/RateLimitingProgressMonitor.java#L66C23-L66C47

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions