Any experiences with LockFile::Simple module?

B

badarisj

folks,

for handling concurrency related issues i wanted to hear about
experiences of others using the LockFile::Simple (or similar modules)
especially if they ran into problems using the module.

please let me know.

thanks,
-badari
 
N

nickelstat

I do not have that specific module, but I do have some strong ideas
about locking and synchronization.

If the module creates a file, and relies on the locking process to
unlock/remove it, then I wouldn't use it.

The problem is that if your application dies, either core-dumps, or
gets killed externally, or even killed by your own code *and you forgot
to remove the lockfile*, then everybody thinks that the locking program
is still using it. Which is false.

What you need is a mechanism that insures that the lock is removed the
same time a process is killed. The only way I see that happening is not
in the code, but in the Operating System.

I would use a kernel semaphore, or a socket for example.
 
B

badarisj

good analysis.

that is why, we want to wrap LockFile::Simple around to provide
stuff like auto-magic lock removals when signals like HUP, TERM, QUIT
are recieved. so that problem of left-over locks should be less painful
that way.

the problem with semaphores etc is with the portability etc; not all
platforms
support the same semaphore capabilities etc. from that respect, the
simple
strategy of LockFile::Simple would be attractive...

thanks,
-badari
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top