Skip to content

Lock files in case of errors #363

@alfechner

Description

@alfechner

Hi and thank you so much for creating this awesome library 😃

For my application it's crucial that the lock is eventually released even if the process crashes, so I have some questions that I didn't find answered in the docs:

  • How does filelock make sure that the lock file is removed even if the app crashes? Is that mechanism reliable or can it fail?
  • Is there a way to detect "orphan" lock files? Let's say I try to acquire a lock, but the lock already exists. Is there a way to know for how long the lock exists already and break it, let's say if it's older than 1 minute?

Maybe this information would be useful in the docs as well.

I really appreciate your help 🙇

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions