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:418:
private Thread.Queue qportals; final MUTEX shortmux; private int closenext; final sfile #if constant(SSL.File) |SSL.File #endif socket;
-
private int towrite;
+
final multiset(sql_result) runningportals = (<>); final MUTEX nostash; final Thread.MutexKey started; final Thread.Queue stashqueue; final Thread.Condition stashavail; final Stdio.Buffer stash; //! @ignore final int(KEEP..SYNCSEND) stashflushmode; //! @endignore
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:489:
#else return this; #endif } return !waitforreal && bufcon(this)->start(); } private int write_cb() { Thread.MutexKey lock = shortmux->lock(); if (this) { // Guard against async destructs
-
towrite -=
output_to(socket
, towrite
);
+
output_to(socket);
lock = 0; if (!i->fillread && !sizeof(this)) close(); } return 0; } private int getstash(int mode) { Thread.MutexKey lock = shortmux->lock(); add(stash); stash->clear();
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:557:
default: PD("%d>Skip flush %d Queue %O\n", socket->query_fd(), mode, (string)this); break outer; case FLUSHSEND: PD("Flush\n"); add(PGFLUSH); case SENDOUT:; } Thread.MutexKey lock = shortmux->trylock();
-
if (lock &&
(towrite =
sizeof(this))
)
{
+
if (lock && sizeof(this)) {
PD("%d>Sendcmd %O\n",
-
socket->query_fd(), (
(
string)this)
[..towrite-1])
;
-
towrite -=
output_to(socket
, towrite
);
+
socket->query_fd(), (string)this);
+
output_to(socket);
} } while (0); started = 0; if (sizeof(stash) && (started = nostash->trylock(2))) { #ifdef PG_DEBUGRACE conxsess sess = conxsess(this); sess->sendcmd(SENDOUT); #else mode = getstash(SENDOUT); continue;