Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clack:stop doesn't work with cl-dbi in my environment #118

Open
hipeta opened this issue Jul 5, 2015 · 5 comments
Open

clack:stop doesn't work with cl-dbi in my environment #118

hipeta opened this issue Jul 5, 2015 · 5 comments

Comments

@hipeta
Copy link

hipeta commented Jul 5, 2015

Hi, I have a problem with using clack and integral.
In my environment (Ubuntu 12.04 64-bit, sbcl 1.2.13, mysql 5.5.43), clack:stop doesn't work with integral.
I have found that it occurs after executing query via cl-dbi.
This is the code.

(ql:quickload '(:clack :cl-dbi))

(dbi:with-connection (conn :mysql :database-name *** :username *** :password ***)
  (dbi:fetch (dbi:execute (dbi:prepare conn "show tables;"))))

(clack:clackup (lambda (env) `(200 (:content-type "text/plain") ("hello"))))

(clack:stop *)

After this, localhost:5000 still returns "hello".
(But ccl 1.10 x86-64 stops the server correctly...)
Though it is perhaps caused by my environment, does anyone have same problem?

@rudolph-miller
Copy link
Contributor

I could reproduce the issue. ;(

@fukamachi
Copy link
Owner

Actually, I found the same problem when starting it with Shelly like a year
ago.
It may be a problem in cl-mysql with thread-enabled SBCL, but I'm still not
sure why.

On Mon, Jul 6, 2015 at 11:10 AM, Rudolph Miller notifications@github.com
wrote:

I could reproduce the issue. ;(


Reply to this email directly or view it on GitHub
#118 (comment).

@rudolph-miller
Copy link
Contributor

Okay, it seems to be the issue of cl-mysql

(ql:quickload '(:cl-mysql ))
(let ((thread (sb-thread:make-thread (lambda () (loop)))))
  (print (sb-thread:thread-alive-p thread))
  (sb-thread:destroy-thread thread)
  (sleep 1)
  (print (sb-thread:thread-alive-p thread)))
;; T
;; NIL

(cl-mysql:connect :database "test" :user "root")

(let ((thread (sb-thread:make-thread (lambda () (loop)))))
  (print (sb-thread:thread-alive-p thread))
  (sb-thread:destroy-thread thread)
  (sleep 1)
  (print (sb-thread:thread-alive-p thread)))
;; T
;; T

.

@hipeta
Copy link
Author

hipeta commented Jul 6, 2015

I understand. I use ccl for now and wait for cl-mysql fixed.
Thanks!

@rudolph-miller
Copy link
Contributor

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants