benjamin.peterson
2008-08-18 23:15:52 UTC
Author: benjamin.peterson
Date: Tue Aug 19 01:15:52 2008
New Revision: 65847
Log:
fix get_name usage
Modified:
python/branches/py3k/Lib/bsddb/test/test_thread.py
Modified: python/branches/py3k/Lib/bsddb/test/test_thread.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_thread.py (original)
+++ python/branches/py3k/Lib/bsddb/test/test_thread.py Tue Aug 19 01:15:52 2008
@@ -89,20 +89,20 @@
self._writerThread(*args, **kwargs)
except db.DBLockDeadlockError:
if verbose:
- print(current_thread().get_name(), 'died from', e)
+ print(current_thread().name, 'died from', e)
else:
if verbose:
- print(current_thread().get_name(), "finished.")
+ print(current_thread().name, "finished.")
def readerThread(self, *args, **kwargs):
try:
self._readerThread(*args, **kwargs)
except db.DBLockDeadlockError as e:
if verbose:
- print(current_thread().get_name(), 'died from', e)
+ print(current_thread().name, 'died from', e)
else:
if verbose:
- print(current_thread().get_name(), "finished.")
+ print(current_thread().name, "finished.")
@@ -143,7 +143,7 @@
t.join()
def _writerThread(self, d, howMany):
- name = current_thread().get_name()
+ name = current_thread().name
start = 0
stop = howMany
if verbose:
@@ -172,7 +172,7 @@
def _readerThread(self, d, readerNum):
time.sleep(0.01 * readerNum)
- name = current_thread().get_name()
+ name = current_thread().name
for loop in range(5):
c = d.cursor()
@@ -240,7 +240,7 @@
t.join()
def _writerThread(self, d, howMany, writerNum):
- name = current_thread().get_name()
+ name = current_thread().name
start = howMany * writerNum
stop = howMany * (writerNum + 1) - 1
if verbose:
@@ -286,7 +286,7 @@
def _readerThread(self, d, readerNum):
time.sleep(0.01 * readerNum)
- name = current_thread().get_name()
+ name = current_thread().name
for loop in range(5):
c = d.cursor()
@@ -385,7 +385,7 @@
time.sleep(0.05)
def _writerThread(self, d, howMany, writerNum):
- name = current_thread().get_name()
+ name = current_thread().name
start = howMany * writerNum
stop = howMany * (writerNum + 1) - 1
if verbose:
@@ -427,7 +427,7 @@
def _readerThread(self, d, readerNum):
time.sleep(0.01 * readerNum + 0.05)
- name = current_thread().get_name()
+ name = current_thread().name
for loop in range(5):
finished = False
Date: Tue Aug 19 01:15:52 2008
New Revision: 65847
Log:
fix get_name usage
Modified:
python/branches/py3k/Lib/bsddb/test/test_thread.py
Modified: python/branches/py3k/Lib/bsddb/test/test_thread.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_thread.py (original)
+++ python/branches/py3k/Lib/bsddb/test/test_thread.py Tue Aug 19 01:15:52 2008
@@ -89,20 +89,20 @@
self._writerThread(*args, **kwargs)
except db.DBLockDeadlockError:
if verbose:
- print(current_thread().get_name(), 'died from', e)
+ print(current_thread().name, 'died from', e)
else:
if verbose:
- print(current_thread().get_name(), "finished.")
+ print(current_thread().name, "finished.")
def readerThread(self, *args, **kwargs):
try:
self._readerThread(*args, **kwargs)
except db.DBLockDeadlockError as e:
if verbose:
- print(current_thread().get_name(), 'died from', e)
+ print(current_thread().name, 'died from', e)
else:
if verbose:
- print(current_thread().get_name(), "finished.")
+ print(current_thread().name, "finished.")
@@ -143,7 +143,7 @@
t.join()
def _writerThread(self, d, howMany):
- name = current_thread().get_name()
+ name = current_thread().name
start = 0
stop = howMany
if verbose:
@@ -172,7 +172,7 @@
def _readerThread(self, d, readerNum):
time.sleep(0.01 * readerNum)
- name = current_thread().get_name()
+ name = current_thread().name
for loop in range(5):
c = d.cursor()
@@ -240,7 +240,7 @@
t.join()
def _writerThread(self, d, howMany, writerNum):
- name = current_thread().get_name()
+ name = current_thread().name
start = howMany * writerNum
stop = howMany * (writerNum + 1) - 1
if verbose:
@@ -286,7 +286,7 @@
def _readerThread(self, d, readerNum):
time.sleep(0.01 * readerNum)
- name = current_thread().get_name()
+ name = current_thread().name
for loop in range(5):
c = d.cursor()
@@ -385,7 +385,7 @@
time.sleep(0.05)
def _writerThread(self, d, howMany, writerNum):
- name = current_thread().get_name()
+ name = current_thread().name
start = howMany * writerNum
stop = howMany * (writerNum + 1) - 1
if verbose:
@@ -427,7 +427,7 @@
def _readerThread(self, d, readerNum):
time.sleep(0.01 * readerNum + 0.05)
- name = current_thread().get_name()
+ name = current_thread().name
for loop in range(5):
finished = False