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