Skip to content

Commit

Permalink
Improve comment about waiting for socket input
Browse files Browse the repository at this point in the history
  • Loading branch information
larskanis committed Aug 17, 2024
1 parent beafa09 commit 7ced092
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/pg_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7ced092

Please sign in to comment.