bpo-30773: Fix ag_running; prohibit running athrow/asend/aclose in parallel (#7468)

This commit is contained in:
Yury Selivanov 2019-09-29 22:59:11 -07:00 committed by GitHub
parent 6758e6e12a
commit fc4a044a3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 64 deletions

View file

@ -79,6 +79,8 @@ typedef struct {
/* Flag is set to 1 when aclose() is called for the first time, or
when a StopAsyncIteration exception is raised. */
int ag_closed;
int ag_running_async;
} PyAsyncGenObject;
PyAPI_DATA(PyTypeObject) PyAsyncGen_Type;