From 7ced09224fcb0351cfe79fd05a0e346e84cd443f Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Sat, 17 Aug 2024 10:07:05 +0200 Subject: [PATCH] Improve comment about waiting for socket input --- ext/pg_connection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/pg_connection.c b/ext/pg_connection.c index e4194a396..4e9d0e7d7 100644 --- a/ext/pg_connection.c +++ b/ext/pg_connection.c @@ -3135,7 +3135,9 @@ pgconn_async_get_last_result(VALUE self) for(;;) { int status; - /* wait for input (without blocking) before reading each result */ + /* Wait for input before reading each result. + * That way we support the ruby-3.x IO scheduler and don't block other ruby threads. + */ wait_socket_readable(self, NULL, get_result_readable); cur = gvl_PQgetResult(conn);