Currently, to execute query in an asynchronous manner, one has to send it by calling pg_sendquery and later consequently poll the connection with pg_isbusy. In my opinion this could be improved by taking advantage of the TCL event mechanism. What comes to my mind is defining callback to be executed after receiving some data on the socket; pg_isbusy could then be called from the callback script instead of being called blindly in a loop.
Currently, to execute query in an asynchronous manner, one has to send it by calling
pg_sendquery
and later consequently poll the connection withpg_isbusy
. In my opinion this could be improved by taking advantage of the TCL event mechanism. What comes to my mind is defining callback to be executed after receiving some data on the socket;pg_isbusy
could then be called from the callback script instead of being called blindly in a loop.