Skip to content

Support polling_interval when using locks as context managers #400

@asaf-kali

Description

@asaf-kali

Hi,

In the public acquire interface, you can pass poll_interval (defaults to 0.05). Because the __enter__ method calls acquire without any arguments, there is no way to specify the interval when using FileLock as a context manager.

I suggest adding poll_interval to FileLock.__init__, such that you can control the default (and as such, propagate it down to acquire when no value is given there).

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