From 45361bfd67a3c0d63df08860b3944ef578472b60 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 28 Jan 2023 07:20:27 -0800 Subject: Tweak --- dnd.asd | 3 ++- endpoints.lisp | 6 ------ flash.lisp | 7 ++++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/dnd.asd b/dnd.asd index f440080..a0bb68a 100644 --- a/dnd.asd +++ b/dnd.asd @@ -18,7 +18,8 @@ #:derrida #:ironclad #:jonathan - #:quri) + #:quri + #:bordeaux-threads) :components ((:file "package") (:file "utilities") (:file "init") diff --git a/endpoints.lisp b/endpoints.lisp index 06a521f..87fc51e 100644 --- a/endpoints.lisp +++ b/endpoints.lisp @@ -67,9 +67,3 @@ I.e. It should be called within the scope of a request handler." (defendpoint* :get "/tavern" () () (with-hero-session (hero) (tavern hero))) - -(defun str (string) - "A String" - string) - - diff --git a/flash.lisp b/flash.lisp index 1fedd4a..b655fa0 100644 --- a/flash.lisp +++ b/flash.lisp @@ -12,6 +12,7 @@ "Number of seconds a flashed value lives.") (defstruct flash-entry + "TABLE is a PLIST" (timestamp (get-universal-time)) (table nil)) @@ -29,9 +30,9 @@ expires." (or (lzb:request-cookie +flash-cookie-name+) (nuid))) (now (get-universal-time))) - ;; holdign a lock here b/c I do stuff in between getting an entry - ;; and writing to it. - (bt:with-lock-held (*flash-lock* ) + ;; holding a lock here b/c I do stuff in between getting an entry + ;; and writing to it. + (bt:with-lock-held (*flash-lock*) (let ((entry (or (gethash key *flashes*) (make-flash-entry)))) -- cgit v1.2.3