Skip to content

Commit 3db30c7

Browse files
Drop redundant pending increment from wakeup-read submission.
After "Handle short io_uring submissions" (b57476a) moved the `selector->pending += 1` into `io_get_sqe()`, the manual increment in `select_internal_without_gvl` introduced by #166 became a double-count. The duplicated count left `pending > 0` after `io_uring_wait_cqe_timeout` drained the SQ internally, sending the next `io_uring_submit_flush` into a busy loop (submit returns 0 because the ring is empty, but `pending > 0` keeps the new while-loop spinning). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 0c5a0bd commit 3db30c7

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

ext/io/event/selector/uring.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,6 @@ int select_internal_without_gvl(struct select_arguments *arguments) {
11391139
io_uring_prep_read(sqe, IO_Event_Interrupt_descriptor(&selector->interrupt), &selector->wakeup_value, sizeof(selector->wakeup_value), 0);
11401140
io_uring_sqe_set_data(sqe, &selector->interrupt);
11411141
selector->wakeup_registered = 1;
1142-
selector->pending += 1;
11431142
}
11441143

11451144
io_uring_submit_flush(selector);

0 commit comments

Comments
 (0)