Skip to content

ThreadlocalRandom instead of ThreadLocal #367

Description

@MartinWitt

Hey,

While reading the changes in the newest releases and the code for it, I saw this comment. https://github.com/google/flogger/blob/master/api/src/main/java/com/google/common/flogger/SamplingRateLimiter.java#L55 If I understand the build system correct flogger requires at least java 8, so ThreadLocalRandom(https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadLocalRandom.html) or ThreadLocal.withInitial is available. Is the comment a relict of the past and the code could be changed?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4type=otherMiscellaneous activities not covered by other type= labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions