mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Issue #23799: Added test.support.start_threads() for running and cleaning up
multiple threads.
This commit is contained in:
commit
c05e260ecb
9 changed files with 75 additions and 78 deletions
|
|
@ -507,10 +507,8 @@ class BZ2FileTest(BaseTest):
|
|||
for i in range(5):
|
||||
f.write(data)
|
||||
threads = [threading.Thread(target=comp) for i in range(nthreads)]
|
||||
for t in threads:
|
||||
t.start()
|
||||
for t in threads:
|
||||
t.join()
|
||||
with support.start_threads(threads):
|
||||
pass
|
||||
|
||||
def testWithoutThreading(self):
|
||||
module = support.import_fresh_module("bz2", blocked=("threading",))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue