Revert revisions:

46640 Patch #1454481:  Make thread stack size runtime tunable.
46647 Markup fix

The first is causing many buildbots to fail test runs, and there
are multiple causes with seemingly no immediate prospects for
repairing them.  See python-dev discussion.

Note that a branch can (and should) be created for resolving these
problems, like

svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH

followed by merging rev 46647 to the new branch.
This commit is contained in:
Tim Peters 2006-06-04 23:52:47 +00:00
parent c7d14452a4
commit 28eeefe566
14 changed files with 5 additions and 332 deletions

View file

@ -194,7 +194,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
if (obj.done == NULL)
return -1;
rv = _beginthread(bootstrap, _pythread_stacksize, &obj);
rv = _beginthread(bootstrap, 0, &obj); /* use default stack size */
if (rv == (Py_uintptr_t)-1) {
/* I've seen errno == EAGAIN here, which means "there are
* too many threads".
@ -333,37 +333,3 @@ PyThread_release_lock(PyThread_type_lock aLock)
if (!(aLock && LeaveNonRecursiveMutex((PNRMUTEX) aLock)))
dprintf(("%ld: Could not PyThread_release_lock(%p) error: %l\n", PyThread_get_thread_ident(), aLock, GetLastError()));
}
/* minimum/maximum thread stack sizes supported */
#define THREAD_MIN_STACKSIZE 0x8000 /* 32kB */
#define THREAD_MAX_STACKSIZE 0x10000000 /* 256MB */
/* set the thread stack size.
* Return 1 if an exception is pending, 0 otherwise.
*/
static int
_pythread_nt_set_stacksize(size_t size)
{
/* set to default */
if (size == 0) {
_pythread_stacksize = 0;
return 0;
}
/* valid range? */
if (size >= THREAD_MIN_STACKSIZE && size < THREAD_MAX_STACKSIZE) {
_pythread_stacksize = size;
return 0;
}
else {
char warning[128];
snprintf(warning,
128,
"thread stack size of %#x bytes not supported on Win32",
size);
return PyErr_Warn(PyExc_RuntimeWarning, warning);
}
}
#undef THREAD_SET_STACKSIZE
#define THREAD_SET_STACKSIZE(x) _pythread_nt_set_stacksize(x)