pike.git / lib / modules / Sql.pmod / pgsql.pike

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:564:    mixed err;    if (is_open()) {    err = catch {    PD("Statementsinflight: %d Portalsinflight: %d\n",    proxy.statementsinflight, proxy.portalsinflight);    if(!proxy.waitforauthready) {    if (!resynced) {    resynced = Thread.Condition();    resyncmux = Thread.Mutex();    } +  Thread.MutexKey lock = resyncmux->lock();    proxy.readyforquery_cb = resync_cb;    proxy.sendsync(); -  if (proxy.readyforquery_cb) { -  Thread.MutexKey lock = resyncmux->lock(); +     resynced.wait(lock); // Wait for the db to finish    } -  } +     return;    };    PD("%O\n", err);    }    if (sizeof(proxy.lastmessage))    ERROR(proxy.a2nls(proxy.lastmessage));   }      //! Due to restrictions of the Postgres frontend-backend protocol, you always   //! already have to be connected to a database.