Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup
  • Loading branch information
kumaraditya303 committed Jan 15, 2025
commit 305233018fe4ac478ff811ad0d2c00e95b41993b
2 changes: 1 addition & 1 deletion Include/internal/pycore_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ typedef enum _PyLockFlags {

// Lock a mutex with an optional timeout and additional options. See
// _PyLockFlags for details.
extern PyLockStatus
extern PyAPI_FUNC(PyLockStatus)
_PyMutex_LockTimed(PyMutex *m, PyTime_t timeout_ns, _PyLockFlags flags);

// Lock a mutex with additional options. See _PyLockFlags for details.
Expand Down
8 changes: 4 additions & 4 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3750,9 +3750,9 @@ _asyncio_all_tasks_impl(PyObject *module, PyObject *loop)
struct llist_node *node;
PyInterpreterState *interp = PyInterpreterState_Get();
_PyEval_StopTheWorld(interp);
_PyThreadStateImpl *ts = (_PyThreadStateImpl *)PyInterpreterState_ThreadHead(interp);
while (ts) {
struct llist_node *head = &ts->asyncio_tasks_head;
_Py_FOR_EACH_TSTATE_BEGIN(interp, p) {
_PyThreadStateImpl *tstate = (_PyThreadStateImpl *)p;
struct llist_node *head = &tstate->asyncio_tasks_head;
llist_for_each_safe(node, head) {
TaskObj *task = llist_data(node, TaskObj, task_node);
// The linked list holds borrowed references to task
Expand All @@ -3771,8 +3771,8 @@ _asyncio_all_tasks_impl(PyObject *module, PyObject *loop)
}
}
}
ts = (_PyThreadStateImpl *)ts->base.next;
}
_Py_FOR_EACH_TSTATE_END(interp);
_PyEval_StartTheWorld(interp);
if (err) {
return NULL;
Expand Down