Skip to content

Reuse Timer instance #2130

Description

@adinauer

Description

Every creation of a Timer spawns a new thread. We should try to reuse an instance if possible.

Implementation note: This class scales to large numbers of concurrently scheduled tasks (thousands should present no problem). Internally, it uses a binary heap to represent its task queue, so the cost to schedule a task is O(log n), where n is the number of concurrently scheduled tasks.
Implementation note: All constructors start a timer thread.
See https://docs.oracle.com/javase/7/docs/api/java/util/Timer.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions