Skip Menu |

This queue is for tickets about the File-SharedNFSLock CPAN distribution.

Report information
The Basics
Id: 81600
Status: resolved
Priority: 0/
Queue: File-SharedNFSLock

Owner: Nobody in particular
Requestors: florent.angly [...]

Bug Information
Severity: Wishlist
Broken in: 0.03
Fixed in: (no value)

Subject: Funtion name a bit misleading
Download (untitled) / with headers
text/plain 940b
Hi Steffen, I find the locked() function name a bit misleading. May I suggest that you rename it to got_lock() because it checks if _I_ got the lock, not if the file is being locked by another process. Also, it might be useful to have a companion function called is_locked() that checks if someone else has got the lock on the file. This remarks are because I currently have a workflow that is not very well accommodated by File::SharedNFSLock: one process writes a file and the others read the file (after it is written) in parallel. At the moment, the 'readers' lock() because they cannot start reading until the 'writer' is finished (has used unlock()). But because everyone can read at the same time, each reader has to unlock() as soon as they get the lock. It would be better if one could have a non-blocking lock. I have noticed the timeout_acquire option, but it is not clear if it is at all related to my query. Best, Florent
Download (untitled) / with headers
text/plain 185b
I documented and aliased the locked() function to got_lock(). Also, for my use case, I implemented a wait() method that waits until there is no lock anymore (see Github repo). Florent

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to