Threadsafe Python client

Jehiah Czebotar jehiah at gmail.com
Tue Jan 24 23:17:12 UTC 2006


On 1/24/06, Philip Neustrom <philipn at gmail.com> wrote:
> I am also using 1.2_tummy5 and I've experienced major problems with
> the module when using threads. I'm in Mac OS 10.4.2, python 2.4 and
> latest memcached.

Philip, I'm going to attach a link to the MemcachePool class I came up
with (and a Bogus memcache client which It also uses). Perhaphs it
will help resolve some of your issues.

The pooling class uses a global pool of memcache clients, and just
wraps the get/set/etc methods transparently handling the
threading/locking issues.

Please check it out and let me know how it works for you.

http://jehiah.com/download/MemcachePool.py.txt
http://jehiah.com/download/Bogus.py.txt

--
Jehiah at gmail.com
http://jehiah.com/


More information about the memcached mailing list