mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config * Always define WITH_THREAD for compatibility.
This commit is contained in:
parent
1f06a680de
commit
a6a4dc816d
135 changed files with 2472 additions and 4377 deletions
|
@ -41,9 +41,7 @@ static void print_subinterp(void)
|
|||
static int test_repeated_init_and_subinterpreters(void)
|
||||
{
|
||||
PyThreadState *mainstate, *substate;
|
||||
#ifdef WITH_THREAD
|
||||
PyGILState_STATE gilstate;
|
||||
#endif
|
||||
int i, j;
|
||||
|
||||
for (i=0; i<15; i++) {
|
||||
|
@ -51,12 +49,10 @@ static int test_repeated_init_and_subinterpreters(void)
|
|||
_testembed_Py_Initialize();
|
||||
mainstate = PyThreadState_Get();
|
||||
|
||||
#ifdef WITH_THREAD
|
||||
PyEval_InitThreads();
|
||||
PyEval_ReleaseThread(mainstate);
|
||||
|
||||
gilstate = PyGILState_Ensure();
|
||||
#endif
|
||||
print_subinterp();
|
||||
PyThreadState_Swap(NULL);
|
||||
|
||||
|
@ -68,9 +64,7 @@ static int test_repeated_init_and_subinterpreters(void)
|
|||
|
||||
PyThreadState_Swap(mainstate);
|
||||
print_subinterp();
|
||||
#ifdef WITH_THREAD
|
||||
PyGILState_Release(gilstate);
|
||||
#endif
|
||||
|
||||
PyEval_RestoreThread(mainstate);
|
||||
Py_Finalize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue