pike.git/
lib/
modules/
Sql.pmod/
pgsql_util.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2016-02-24
2016-02-24 12:45:30 by Stephen R. van den Berg <srb@cuci.nl>
e7c73229c9737f26cb9bcbc392b34cb4fbd70cc9 (
8
lines) (+
8
/-
0
)
[
Show
|
Annotate
]
Branch:
8.0
pgsql: Sync destruction of objects with natural thread termination.
228:
private Thread.Queue qportals; final Thread.Mutex shortmux;
+
private Thread.Mutex termthread;
+
private Thread.MutexKey termlock;
+
final Stdio.File socket; private function(void|mixed:void) connectfail; private int towrite;
355:
foreach(closecallbacks;function(void|mixed:void) closecb;) closecb(); closecallbacks=(<>);
+
termlock=0;
return ret; } protected void destroy() {
-
+
termlock=termthread->lock();
catch(close()); // Exceptions don't work inside destructors connectfail=0;
-
+
termthread->lock(1);
} final void connectloop(object pgsqlsess, int nossl) {
435:
i=conxiin(); shortmux=Thread.Mutex(); nostash=Thread.Mutex();
+
termthread=Thread.Mutex();
stashavail=Thread.Condition(); stashqueue=Thread.Queue(); stash=Stdio.Buffer();