We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a977922 commit 759de2bCopy full SHA for 759de2b
Lib/test/test_threading.py
@@ -1338,7 +1338,7 @@ def run(self):
1338
# explicitly break the reference cycle to not leak a dangling thread
1339
thread.exc = None
1340
1341
- def test_multithread_modify_file(self):
+ def test_multithread_modify_file_noerror(self):
1342
import traceback
1343
def modify_file():
1344
with open(__file__, 'a') as fp:
@@ -1349,8 +1349,13 @@ def modify_file():
1349
threading.Thread(target=modify_file)
1350
for i in range(100)
1351
]
1352
- [t.start() for t in threads]
1353
- [t.join() for t in threads]
+ try:
+ for t in threads:
1354
+ t.start()
1355
1356
+ t.join()
1357
+ finally:
1358
+ pass
1359
1360
1361
class ThreadRunFail(threading.Thread):
0 commit comments