Patch #1454481: Make thread stack size runtime tunable.

This commit is contained in:
Andrew MacIntyre 2006-06-04 12:31:09 +00:00
parent 7a071939d9
commit 6539d2d3c7
14 changed files with 332 additions and 5 deletions

View file

@ -85,6 +85,22 @@ def test_various_ops(self):
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 (16MB)
def test_various_ops_large_stack(self):
if verbose:
print 'with 16MB thread stack size...'
threading.stack_size(0x1000000)
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):