bpo-33608: Deal with pending calls relative to runtime shutdown. (gh-12246)

This commit is contained in:
Eric Snow 2019-03-15 15:47:51 -06:00 committed by GitHub
parent 7c4fcb6b05
commit 842a2f07f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 70 additions and 22 deletions

View file

@ -11,7 +11,10 @@ extern "C" {
#include "pycore_atomic.h"
#include "pythread.h"
PyAPI_FUNC(void) _Py_FinishPendingCalls(void);
struct _pending_calls {
int finishing;
PyThread_type_lock lock;
/* Request for running pending calls. */
_Py_atomic_int calls_to_do;