summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--examples/threaded8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/threaded b/examples/threaded
index 962563a..7b37cce 100644
--- a/examples/threaded
+++ b/examples/threaded
@@ -29,25 +29,25 @@ class threadlocal:
self.tmap = {}
def __getitem__(self, i):
- t = threading.current_thread()
+ t = threading.get_ident()
if t not in self.tmap:
self.tmap[t] = self.default[:]
return self.tmap[t][i]
def __len__(self):
- t = threading.current_thread()
+ t = threading.get_ident()
if t not in self.tmap:
self.tmap[t] = self.default[:]
return len(self.tmap[t])
def __setitem__(self, i, x):
- t = threading.current_thread()
+ t = threading.get_ident()
if t not in self.tmap:
self.tmap[t] = self.default[:]
self.tmap[t][i] = x
def __delitem__(self, i):
- t = threading.current_thread()
+ t = threading.get_ident()
if t not in self.tmap:
self.tmap[t] = self.default[:]
del self.tmap[t][x]