File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1655,9 +1655,7 @@ FutureIter_dealloc(futureiterobject *it)
16551655}
16561656
16571657static PySendResult
1658- FutureIter_am_send_lock_held (futureiterobject * it ,
1659- PyObject * Py_UNUSED (arg ),
1660- PyObject * * result )
1658+ FutureIter_am_send_lock_held (futureiterobject * it , PyObject * * result )
16611659{
16621660 /* arg is unused, see the comment on FutureIter_send for clarification */
16631661
@@ -1681,7 +1679,9 @@ FutureIter_am_send_lock_held(futureiterobject *it,
16811679 }
16821680
16831681 it -> future = NULL ;
1682+ Py_BEGIN_CRITICAL_SECTION (fut );
16841683 res = _asyncio_Future_result_impl (fut );
1684+ Py_END_CRITICAL_SECTION ();
16851685 if (res != NULL ) {
16861686 Py_DECREF (fut );
16871687 * result = res ;
@@ -1698,9 +1698,9 @@ FutureIter_am_send(futureiterobject *it,
16981698 PyObject * * result )
16991699{
17001700 PySendResult res ;
1701- Py_BEGIN_CRITICAL_SECTION2 (it , it -> future );
1702- res = FutureIter_am_send_lock_held (it , Py_None , result );
1703- Py_END_CRITICAL_SECTION2 ();
1701+ Py_BEGIN_CRITICAL_SECTION (it );
1702+ res = FutureIter_am_send_lock_held (it , result );
1703+ Py_END_CRITICAL_SECTION ();
17041704 return res ;
17051705}
17061706
You can’t perform that action at this time.
0 commit comments