bpo-32604: Clean up created subinterpreters before runtime finalization. (gh-5709)

This commit is contained in:
Eric Snow
2018-02-16 18:53:40 -07:00
committed by GitHub
parent bd093355a6
commit 4c6955e2b0
5 changed files with 410 additions and 31 deletions

View File

@@ -8,6 +8,8 @@
extern "C" {
#endif
#include "pythread.h"
/* This limitation is for performance and simplicity. If needed it can be
removed (with effort). */
#define MAX_CO_EXTRA_USERS 255
@@ -111,6 +113,8 @@ typedef struct _is {
struct _ts *tstate_head;
int64_t id;
int64_t id_refcount;
PyThread_type_lock id_mutex;
PyObject *modules;
PyObject *modules_by_index;