(self,mapping)
return memclient.mclient.set_multi(newmapping,time=self._timeout)
同时修改多个key值
同时修改多个key值
同时修改多个key值
def update_multi(self,mapping):
        '''同时修改多个key值
        '''
        if self._cas and not self.isLocked():
            for _ in xrange(10):
                if not self.lock():
                    gevent.sleep(0.2)
                    continue
                break
            else:
                return None
        newmapping = dict(zip([self.produceKey(keyname) for keyname in mapping.keys()],
                              mapping.values()))
        return memclient.mclient.set_multi(newmapping,time=self._timeout)
def update_multi ( self , mapping ) : if self . _cas and not self . isLocked ( ) : for _ in xrange ( 10 ) : if not self . lock ( ) : gevent . sleep ( 0.2 ) continue break else : return None newmapping = dict ( zip ( [ self . produceKey ( keyname ) for keyname in mapping . keys ( ) ] , mapping . values ( ) ) ) return memclient . mclient . set_multi ( newmapping , time = self . _timeout )