pike.git/
lib/
modules/
Sql.pmod/
pgsql_util.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2020-06-22
2020-06-22 12:02:00 by Stephen R. van den Berg <srb@cuci.nl>
8e5edaffc6aa9ed65b169b55f19273e3e1f207ad (
13
lines) (+
7
/-
6
)
[
Show
|
Annotate
]
Branch:
master
pgsql: Terminate early if the processloop has already folded.
1966:
final int _fetchlimit = FETCHLIMIT; final MUTEX unnamedportalmux; final MUTEX unnamedstatement;
-
private Thread.MutexKey termlock;
+
private Thread.MutexKey
|int
termlock;
final Thread.ResourceCount portalsinflight, statementsinflight; final int(0..1) wasparallelisable; final int(0..1) intransaction;
2142:
if (catch(cs = ci->start())) { destruct(waitforauthready); unnamedstatement = 0;
-
termlock =
0
;
+
termlock =
1
;
return; } else { CHAIN(cs)->add_hstring(plugbuffer, 4, 4);
2850:
portal->_purgeportal(); } destruct(waitforauthready);
-
termlock =
0
;
+
termlock =
1
;
if (err && !stringp(err)) throw(err); }; catch { unnamedstatement = 0;
-
termlock =
0
;
+
termlock =
1
;
if (err) { PD("Terminating processloop due to %s\n", describe_backtrace(err)); delayederror = err;
2870:
throwdelayederror(this); { Thread.MutexKey lock;
-
if (unnamedstatement)
+
if (unnamedstatement
&& !termlock
)
termlock = unnamedstatement->lock(1); foreach (c->runningportals; Result result; ) if (result->_state < CLOSED)