summaryrefslogtreecommitdiff
path: root/Lib/dummy_thread.py
diff options
context:
space:
mode:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>2006-06-13 15:04:24 +0000
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>2006-06-13 15:04:24 +0000
commit9291332de137141057591386b4ba449ae3a5ed48 (patch)
tree31e4a0a2411052ceb8e05284fe9409c6995f79ca /Lib/dummy_thread.py
parentc6f5b3ad6c9e93235f9aa53d1ed8086030fbcd6c (diff)
downloadcpython-git-9291332de137141057591386b4ba449ae3a5ed48.tar.gz
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).
Diffstat (limited to 'Lib/dummy_thread.py')
-rw-r--r--Lib/dummy_thread.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/dummy_thread.py b/Lib/dummy_thread.py
index 21fd03f27f..7c26f9e5ef 100644
--- a/Lib/dummy_thread.py
+++ b/Lib/dummy_thread.py
@@ -20,6 +20,7 @@ __all__ = ['error', 'start_new_thread', 'exit', 'get_ident', 'allocate_lock',
'interrupt_main', 'LockType']
import traceback as _traceback
+import warnings
class error(Exception):
"""Dummy implementation of thread.error."""
@@ -75,6 +76,13 @@ def allocate_lock():
"""Dummy implementation of thread.allocate_lock()."""
return LockType()
+def stack_size(size=None):
+ """Dummy implementation of thread.stack_size()."""
+ if size is not None:
+ msg = "setting thread stack size not supported on this platform"
+ warnings.warn(msg, RuntimeWarning)
+ return 0
+
class LockType(object):
"""Class implementing dummy implementation of thread.LockType.