mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Make time.sleep calls go to 0 for common testing.
This commit is contained in:
parent
e6b7033e79
commit
13da5fa999
2 changed files with 19 additions and 11 deletions
|
@ -12,7 +12,10 @@ class TestThread(_threading.Thread):
|
|||
|
||||
def run(self):
|
||||
global running
|
||||
delay = random.random() * 2
|
||||
# Uncomment if testing another module, such as the real 'threading'
|
||||
# module.
|
||||
#delay = random.random() * 2
|
||||
delay = 0
|
||||
if verbose:
|
||||
print 'task', self.getName(), 'will run for', delay, 'sec'
|
||||
sema.acquire()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue