Skip to content

Why can I acquire the same lock twice? #261

Description

@fostiropoulos

It is not clear why I can acquire the same lock more than once e.g.

from filelock import Timeout, FileLock

file_path = "high_ground.txt"
lock_path = "high_ground.txt.lock"

lock = FileLock(lock_path, timeout=1)
lock.acquire()
lock.acquire()

Shouldn't this throw an error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    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