mirror of
https://github.com/python/cpython.git
synced 2025-07-28 05:34:31 +00:00
Patch #1454481: Make thread stack size runtime tunable.
Heavily revised, comprising revisions: 46640 - original trunk revision (backed out in r46655) 46647 - markup fix (backed out in r46655) 46692:46918 merged from branch aimacintyre-sf1454481 branch tested on buildbots (Windows buildbots had problems not related to these changes).
This commit is contained in:
parent
c6f5b3ad6c
commit
9291332de1
14 changed files with 349 additions and 6 deletions
|
@ -85,6 +85,22 @@ class ThreadTests(unittest.TestCase):
|
|||
print 'all tasks done'
|
||||
self.assertEqual(numrunning.get(), 0)
|
||||
|
||||
# run with a minimum thread stack size (32kB)
|
||||
def test_various_ops_small_stack(self):
|
||||
if verbose:
|
||||
print 'with 32kB thread stack size...'
|
||||
threading.stack_size(0x8000)
|
||||
self.test_various_ops()
|
||||
threading.stack_size(0)
|
||||
|
||||
# run with a large thread stack size (1MB)
|
||||
def test_various_ops_large_stack(self):
|
||||
if verbose:
|
||||
print 'with 1MB thread stack size...'
|
||||
threading.stack_size(0x100000)
|
||||
self.test_various_ops()
|
||||
threading.stack_size(0)
|
||||
|
||||
def test_foreign_thread(self):
|
||||
# Check that a "foreign" thread can use the threading module.
|
||||
def f(mutex):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue