I'm trying to get the following to work a certain way:
(sb-thread::make-thread (lambda ()
(loop (format t "lisp> ")
(print (eval (read)))
Now type (quit) at the prompt, sbcl appears as though it is not
running (it is of course, if you happen to be listening on a socket
you can still interact that way). For my program, I would like typing
(quit) to terminate sbcl.
"...sb-ext:quit terminates all threads in the current session, but leaves
other sessions running. "
It would seem that either sbcl has created more than one session (even
though I was not aware of requesting another session), it's waiting
for the original thread to terminate, or the behavior has changed in
the never version of sbcl.
Is there something I can set so that calling quit will cause all
threads to terminate? Or failling that, is there some way of telling
each thread to terminate? I found sb-thread:terminate-thread and
sb-thread::mapcar-threads, but I couldn't figure out how to tell each
thread to terminate.
Personally, I find the behavior of quit to be odd here. Calling quit
and not having all threads terminate seems unnatural to me. If I only
wanted to terminate a single thread or a single session, I would look
for quit-thread, or quit-session functions. It would be nice if the
behavior of quit didn't change based on the number of threads.