Decorator that increase the stack size for a function
Project description
Description
This decorator increases the stack size for the function and its recursion limit. The function runs in a separated thread with a stack size specified by the stacksize parameter (default: 128MiB). Also the recursion limit can be modified by the recursionlimit parameter (default: 1M), but be aware that this is a variable shared by the whole python environment, so a subsequent invocation of a decorated function may change it.
@bigstack
def function(...):
"""Highly recursive function."""
...
@bigstack(stacksize=2 ** 30) # stack size = 1GB
def function(...):
"""Highly recursive function."""
...
Installation
The package has been uploaded to PyPI, so you can install it with pip:
pip install bigstack
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bigstack-0.1.1.tar.gz
(2.0 kB
view details)
File details
Details for the file bigstack-0.1.1.tar.gz
.
File metadata
- Download URL: bigstack-0.1.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8227adaf6aa9b2bc2fb625da5d063a3222f257141c1a06395b3683932dd20546 |
|
MD5 | 97fd7490b5dbaf6026e6d7ad225962e2 |
|
BLAKE2b-256 | 927af7d5be8930de567649044ef00bd54dac8a2a807d43a587508890cfcd2add |