Skip to content

Time-unit blunder #1087

@arnimarj

Description

@arnimarj

_CACHE_CLEANUP_RATE_NS: ClassVar[int] = 6 * 10 ^ 10 # 1 minute

The stated comment says that 6 * 10 ^ 10 is 1 minute, but it is in-fact 54 nanoseconds, cause ^ is XOR in Python.

This then causes the cleanup threads to frantically spin.

Just importing the module causes the CPU to immediately spike.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions