projects
/
clsql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ba2e10f
)
whitespace-cleanup
author
Nathan Bird
<nathan@acceleration.net>
Tue, 2 Mar 2010 22:16:36 +0000
(17:16 -0500)
committer
Nathan Bird
<nathan@acceleration.net>
Tue, 2 Mar 2010 23:16:46 +0000
(18:16 -0500)
sql/pool.lisp
patch
|
blob
|
history
diff --git
a/sql/pool.lisp
b/sql/pool.lisp
index 5f871532bb78d6cb8111ea63bbbc41e90eb5931e..38d32cdd21a125c543bcbd4471b087c7cd4ffd3b 100644
(file)
--- a/
sql/pool.lisp
+++ b/
sql/pool.lisp
@@
-30,7
+30,7
@@
that should, on avg keep the free connections about this size.")
(free-connections :accessor free-connections :initform nil)
(all-connections :accessor all-connections :initform nil)
(lock :accessor conn-pool-lock
(free-connections :accessor free-connections :initform nil)
(all-connections :accessor all-connections :initform nil)
(lock :accessor conn-pool-lock
-
:initform (make-process-lock "Connection pool"))))
+ :initform (make-process-lock "Connection pool"))))
(defun acquire-from-pool (connection-spec database-type &optional pool)
(defun acquire-from-pool (connection-spec database-type &optional pool)
@@
-131,12
+131,12
@@
chance to do cleanup."
if not found"
(with-process-lock (*db-pool-lock* "Find-or-create connection")
(let* ((key (list connection-spec database-type))
if not found"
(with-process-lock (*db-pool-lock* "Find-or-create connection")
(let* ((key (list connection-spec database-type))
-
(conn-pool (gethash key *db-pool*)))
+ (conn-pool (gethash key *db-pool*)))
(unless conn-pool
(unless conn-pool
-
(setq conn-pool (make-instance 'conn-pool
-
:connection-spec connection-spec
-
:pool-database-type database-type))
-
(setf (gethash key *db-pool*) conn-pool))
+ (setq conn-pool (make-instance 'conn-pool
+ :connection-spec connection-spec
+ :pool-database-type database-type))
+ (setf (gethash key *db-pool*) conn-pool))
conn-pool)))
(defun disconnect-pooled (&optional clear)
conn-pool)))
(defun disconnect-pooled (&optional clear)
@@
-145,8
+145,8
@@
the pool objects."
(with-process-lock (*db-pool-lock* "Disconnect pooled")
(maphash
#'(lambda (key conn-pool)
(with-process-lock (*db-pool-lock* "Disconnect pooled")
(maphash
#'(lambda (key conn-pool)
-
(declare (ignore key))
-
(clear-conn-pool conn-pool))
+ (declare (ignore key))
+ (clear-conn-pool conn-pool))
*db-pool*)
(when clear (clrhash *db-pool*)))
t)
*db-pool*)
(when clear (clrhash *db-pool*)))
t)