Closed archimag closed 9 years ago
DO-FINALLY must finish the returned promise with the values of the given promise. It's important for a code like:
(defmacro with-mongo-db ((db-symbol) &body body) (with-unique-names (client1 client2) `(let (,client1) (chain (mongo:create-mongo-client :cl-async) (:attach (,client2) (setf ,client1 ,client2) (make-instance 'mongo:database :mongo-client ,client2 :name "test")) (:attach (,db-symbol) ,@body) (:finally () (mongo:mongo-client-close ,client1))))))
Your version is more correct, thank you for the update!
DO-FINALLY must finish the returned promise with the values of the given promise. It's important for a code like: