diff options
author | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2006-06-04 12:31:09 +0000 |
---|---|---|
committer | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2006-06-04 12:31:09 +0000 |
commit | 6539d2d3c758b507f10779e218d52d6c9f355025 (patch) | |
tree | d3677cd901f44e2341a50be45d8a3d2f6d1f4da6 /Lib/test/test_threading.py | |
parent | 7a071939d96702e13c377a5e7f87df7bf20391e5 (diff) | |
download | cpython-git-6539d2d3c758b507f10779e218d52d6c9f355025.tar.gz |
Patch #1454481: Make thread stack size runtime tunable.
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 7eb9758ecf..09e84f4389 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -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 (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): |