Skip to content

Allow the use ReentrantLock instead of SpinLock #39

@gbrgr

Description

@gbrgr

In the current implementation, if a user needs to hold the cache's lock over multiple gets/sets, one cannot use the cache's internal lock since it is a SpinLock and blocks.

Suggestion: Use a ReentrantLock or provide the user the option to use such a lock instead of a SpinLock. Moreover, implement

Base.lock(lru::LRU) = lock(lru.lock)

(likewise for unlock) to allow users taking that lock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions