All Samples(102) | Call(102) | Derive(0) | Import(0)
stack_size([size]) -> size Return the thread stack size used when creating new threads. The optional size argument specifies the stack size (in bytes) to be used for subsequently created threads, and must be 0 (use platform or configured default) or a positive integer value of at least 32,768 (32k). If changing the thread stack size is unsupported, a ThreadError exception is raised. If the specified size is invalid, a ValueError exception is raised, and the stack size is unmodified. 32k bytes currently the minimum supported stack size value to guarantee sufficient stack space for the interpreter itself. Note that some platforms may have particular restrictions on values for the stack size, such as requiring a minimum stack size larger than 32kB or requiring allocation in multiples of the system memory page size - platform documentation should be referred to for more information (4kB pages are common; using multiples of 4096 for the stack size is the suggested approach in the absence of more specific information).
src/r/s/rsf-HEAD/scons/scons-2.0.1/engine/SCons/Job.py rsf(Download)
self.resultsQueue = queue.Queue(0)
try:
prev_size = threading.stack_size(stack_size*1024)
except AttributeError, e:
# Only print a warning if the stack size has been
# explicitly set.
self.workers.append(worker)
if 'prev_size' in locals():
threading.stack_size(prev_size)
def put(self, task):
"""Put task into request queue."""
src/a/u/audiere-HEAD/trunk/audiere/third-party/scons-local-1.2.0/SCons/Job.py audiere(Download)
self.resultsQueue = Queue.Queue(0)
try:
prev_size = threading.stack_size(stack_size*1024)
except AttributeError, e:
# Only print a warning if the stack size has been
# explicitly set.
# Once we drop Python 1.5 we can change the following to:
#if 'prev_size' in locals():
if 'prev_size' in locals().keys():
threading.stack_size(prev_size)
def put(self, task):
"""Put task into request queue."""
src/a/u/audiere-HEAD/audiere/third-party/scons-local-1.2.0/SCons/Job.py audiere(Download)
self.resultsQueue = Queue.Queue(0)
try:
prev_size = threading.stack_size(stack_size*1024)
except AttributeError, e:
# Only print a warning if the stack size has been
# explicitly set.
# Once we drop Python 1.5 we can change the following to:
#if 'prev_size' in locals():
if 'prev_size' in locals().keys():
threading.stack_size(prev_size)
def put(self, task):
"""Put task into request queue."""
src/n/u/numscons-0.10.1/numscons/scons-local/scons-local-1.2.0/SCons/Job.py numscons(Download)
self.resultsQueue = Queue.Queue(0)
try:
prev_size = threading.stack_size(stack_size*1024)
except AttributeError, e:
# Only print a warning if the stack size has been
# explicitly set.
# Once we drop Python 1.5 we can change the following to:
#if 'prev_size' in locals():
if 'prev_size' in locals().keys():
threading.stack_size(prev_size)
def put(self, task):
"""Put task into request queue."""
src/s/a/sanet-HEAD/poller/main.py sanet(Download)
else:
val = settings.POLLER_STACK_SIZE
threading.stack_size(val * ONE_KB)
log.debug("Default thread stack size set to %s Kb" % (val))
src/j/y/jython-HEAD/sandbox/wierzbicki/test27/CPythonLib/test/test_threading.py jython(Download)
def test_various_ops_small_stack(self):
if verbose:
print 'with 256kB thread stack size...'
try:
threading.stack_size(262144)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
def test_various_ops_large_stack(self):
if verbose:
print 'with 1MB thread stack size...'
try:
threading.stack_size(0x100000)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
src/j/y/jython-HEAD/sandbox/wierzbicki/test27/Lib/test/test_threading.py jython(Download)
def test_various_ops_small_stack(self):
if verbose:
print 'with 256kB thread stack size...'
try:
threading.stack_size(262144)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
def test_various_ops_large_stack(self):
if verbose:
print 'with 1MB thread stack size...'
try:
threading.stack_size(0x100000)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
src/j/y/jython-HEAD/sandbox/tobias/jython/Lib/test/test_threading.py jython(Download)
def test_various_ops_small_stack(self):
if verbose:
print 'with 256kB thread stack size...'
try:
threading.stack_size(262144)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
def test_various_ops_large_stack(self):
if verbose:
print 'with 1MB thread stack size...'
try:
threading.stack_size(0x100000)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
src/j/y/jython-HEAD/sandbox/tobias/jython/CPythonLib/test/test_threading.py jython(Download)
def test_various_ops_small_stack(self):
if verbose:
print 'with 256kB thread stack size...'
try:
threading.stack_size(262144)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
def test_various_ops_large_stack(self):
if verbose:
print 'with 1MB thread stack size...'
try:
threading.stack_size(0x100000)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
src/j/y/jython-HEAD/jython/Lib/test/test_threading.py jython(Download)
def test_various_ops_small_stack(self):
if verbose:
print 'with 256kB thread stack size...'
try:
threading.stack_size(262144)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
def test_various_ops_large_stack(self):
if verbose:
print 'with 1MB thread stack size...'
try:
threading.stack_size(0x100000)
except thread.error:
if verbose:
print 'platform does not support changing thread stack size'
return
self.test_various_ops()
threading.stack_size(0)
1 | 2 | 3 Next