Hi, Am 07.10.2011 01:57, schrieb Vincent Pelletier: > Le jeudi 06 octobre 2011 21:18:39, Andreas Gabriel a écrit : > I couldn't resist writing my own version inspired from your code: > https://github.com/vpelletier/python-memcachelock
That's no problem :) > It lacks any integration with ZODB. > It drops support for non-"cas" memcached. I understand your code relies on > ZODB conflicts as last resort, but I wanted to scratch an itch :) . > It drops support for timeout (not sure why they are used for, so it's > actually > more a "left asides" than a drop). This feature supports the fallback from pessimistic locking to the standard optimistic locking of ZODB (if all locks are lost because of a restart of memcachd etc.) -> details: http://pypi.python.org/pypi/unimr.memcachedlock > I admit this is my first real attempt at using "cas", and the documentation > mentions gets must be called before calling cas for it to succeed. I don't > see > gets calls in your code, so I wonder if there wouldn't be a bug... Or maybe > it's just my misunderstanding. self._update() in the while loop is called (calls indirectly the memcache "query" method, a synonym for "get") before the "cas" method is called. > As the README states: it's not well tested. I only did stupid sanity checks > (2 > instances in a single python interactive interpreter, one guy on the keyboard > - and a slow one, because it's late) and a pylint run. Please continue your developement because this will be important feature/enhancement for big zope sites with many zeo-clients under heavy load. kind regards Andreas -- Dr. Andreas Gabriel, Hochschulrechenzentrum, http://www.uni-marburg.de/hrz Hans-Meerwein-Str., 35032 Marburg, fon +49 (0)6421 28-23560 fax 28-26994 -------------------- Philipps-Universitaet Marburg ----------------------- _______________________________________________ For more information about ZODB, see http://zodb.org/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev