File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,8 +106,10 @@ class _ConnectionDeadError(Exception):
106106_SOCKET_TIMEOUT = 3 # number of seconds before sockets timeout.
107107
108108
109- class Client (threading .local ):
110- """Object representing a pool of memcache servers.
109+ class BasicClient (object ):
110+ """Object representing a pool of memcache servers. This is not thread-safe,
111+ and should either be wrapped in a thread-local variable or other
112+ synchronizing mechanism.
111113
112114 See L{memcache} for an overview.
113115
@@ -1500,6 +1502,14 @@ def __str__(self):
15001502 return "unix:%s%s" % (self .address , d )
15011503
15021504
1505+ class Client (BasicClient , threading .local ):
1506+ """
1507+ Thread-safe memcache client. See L{BasicClient} for more information on how
1508+ to use this class.
1509+ """
1510+ pass
1511+
1512+
15031513def _doctest ():
15041514 import doctest
15051515 import memcache
You can’t perform that action at this time.
0 commit comments