fixing wait_connection_availability()

wait_connection_availability() did take at least 2 seconds per call in
the old incarnation. Now we may finish a call without any sleep at all
when the result is already ready at the time called
This commit is contained in:
Christian Kruse
2014-02-15 01:31:12 +01:00
parent d58fd080ca
commit 18f1fed77f
2 changed files with 43 additions and 12 deletions

View File

@@ -39,6 +39,6 @@ const char *get_cluster_size(PGconn *conn);
PGconn *getMasterConnection(PGconn *standby_conn, char *schema, char *cluster,
int *master_id, char *master_conninfo_out);
int wait_connection_availability(PGconn *conn, int timeout);
int wait_connection_availability(PGconn *conn, unsigned long timeout);
bool CancelQuery(PGconn *conn, int timeout);
#endif