mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
Patch #1454481: Make thread stack size runtime tunable.
This commit is contained in:
parent
7a071939d9
commit
6539d2d3c7
14 changed files with 332 additions and 5 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue