harlowja / fasteners

A python package that provides useful locks.
Apache License 2.0
246 stars 45 forks source link

Provide capability to check lock status #35

Open chrahunt opened 5 years ago

chrahunt commented 5 years ago

This can be useful for interactive debugging or not-so-paranoid asserts/logging when a file lock is supposed to be in effect.

Since this isn't provided directly by Python, it would need to be done using ctypes/C/Cython and interact with platform-specific APIs. In order to implement this enhancement we would need to either:

  1. Use another library (but currently this library does not have any dependencies)
  2. Implement the required functionality in this library (may impact portability, but it could degrade gracefully)