在memcached之上实现分布式锁。
memcached_lock的Python项目详细描述
memcached_lock
使用memcached或 与memcached兼容的存储器。
示例
基本用法示例:
from __future__ import with_statement import memcache from memcached_lock import dist_lock client = memcache.Client(['127.0.0.1:11211']) with dist_lock('test', client): print 'Is there anybody out there!?'