IPC::Lock::Memcached

Cahill, Earl ecahill at corp.untd.com
Fri Oct 21 14:53:16 PDT 2005


Not indexed yet, but a new version is here

http://earl.spack.net/cpan/IPC-Lock-0.12.tar.gz

> MySQL has a GET_LOCK function which is probably more appropriate for
this.

Thanks for the tip, but unfortunately, it doesn't look like a good
match.  This page

http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Miscellaneous_fu
nctions.html

Says that 

A lock is released when you execute RELEASE_LOCK(), execute a new
GET_LOCK() . . .

So don't really want the lock getting released everytime someone calls
GET_LOCK().  I can't really believe that is the functionality.  There is
also a IS_FREE_LOCK() call, but yeah, that leads to total race
conditions.  I just tested and did two successive GET_LOCK() calls and
both of them got the lock :(  Having a hard time understanding what use
could possibly come from GET_LOCK().

> A suggestion in the docs to call unlock() explicitly might be good.

Added.

> Some kind of advisory note 

Also added.

Thanks for the feedback.

Earl


More information about the memcached mailing list