File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,10 @@ class _ConnectionDeadError(Exception):
106
106
_SOCKET_TIMEOUT = 3 # number of seconds before sockets timeout.
107
107
108
108
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.
111
113
112
114
See L{memcache} for an overview.
113
115
@@ -1500,6 +1502,14 @@ def __str__(self):
1500
1502
return "unix:%s%s" % (self .address , d )
1501
1503
1502
1504
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
+
1503
1513
def _doctest ():
1504
1514
import doctest
1505
1515
import memcache
You can’t perform that action at this time.
0 commit comments