pike.git
/
lib
/
modules
/
Sql.pmod
/
pgsql_util.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:509:
portal._portalname, ++queueoutidx, synctransact, sizeof(this)); } final bufcon|conxsess start(void|int waitforreal) { Thread.MutexKey lock; #ifdef PG_DEBUGRACE if (nostash->current_locking_thread()) PD("Nostash locked by %s\n", describe_backtrace(nostash->current_locking_thread()->backtrace())); #endif
-
while
(lock = (waitforreal ? nostash->lock : nostash->trylock)(1)) {
+
if
(lock = (waitforreal ? nostash->lock : nostash->trylock)(1)) {
stashcount->wait_till_drained(); #ifdef PG_DEBUGRACE conxsess sess = conxsess(this); #endif
-
started = lock;
-
lock = 0; // Release often, release early
+
int mode; if (sizeof(stash) && (mode = getstash(KEEP)) > KEEP)
-
sendcmd(mode); //
Force
out
stash
to
the
server
+
sendcmd(mode);
//
Force
out
stash
to
the
server
+
started = lock;
//
sendcmd()
clears
started,
so
delay
assignment
#ifdef PG_DEBUGRACE return sess; #else return this; #endif } return bufcon(this)->start(); } private int write_cb() {
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:605:
add(PGFLUSH); case SENDOUT:; } if (towrite = sizeof(this)) { PD("%d>Sendcmd %O\n", socket->query_fd(), ((string)this)[..towrite-1]); towrite -= output_to(socket, towrite); } } while (0); started = 0;
-
if (sizeof(stash) && (started = nostash->trylock(
1
))) {
+
if (sizeof(stash) && (started = nostash->trylock(
2
))) {
#ifdef PG_DEBUGRACE conxsess sess = conxsess(this); sess->sendcmd(SENDOUT); #else mode = getstash(SENDOUT); continue; #endif } return; };