Skip to content

Use of Thread.sleep() #10486

Open
Open
@JaimeGarcia2005

Description

@JaimeGarcia2005

problem

In the analysis of SonarCloud of this project, we can see that the function Thread.sleep() is used in the file engine/orchestration/src/main/java/com/cloud/agent/manager/DirectAgentAttache.java. This is a problem that can lead into big perfomance issues. If it was used the function wait() instead of it, the resources that CloudStack uses could be used by the computer to other programs until the wait finishes.

versions

No response

The steps to reproduce the bug

No response

What to do about it?

The code of the file engine/orchestration/src/main/java/com/cloud/agent/manager/DirectAgentAttache.java should be rewritten to be use the function wait() instead of the function Thread.sleep().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions