I have been playing with saving running Common Lisp images to save time upon restart and make the development more efficient. However, I am having a bit of a problem since when I run the following command in the Emacs/SLIME:
(sb-ext:save-lisp-and-die "rest-api-image" :purify t)
I get the following error. Clearly, it is complaining about seeing multiple threads. As far as I can see, these are not threads I created programmatically. Instead, these are Lisp- and Emacs-created. Is there a workaround here? Can the image still be saved?
Cannot save core with multiple threads running.
Interactive thread (of current session):
#<THREAD "main thread" RUNNING {1000550853}>
Other threads:
#<THREAD "Swank Sentinel" #1=waiting on:
#<WAITQUEUE {1004AB8003}>
{1004AB4753}>,
#<THREAD "control-thread" #1#
#<WAITQUEUE {1005BC54D3}>
{1004D87F03}>,
#<THREAD "reader-thread" RUNNING {1004D88063}>,
#<THREAD "swank-indentation-cache-thread" #1#
#<WAITQUEUE {1004D980E3}>
{1004D88183}>,
#<THREAD "auto-flush-thread" RUNNING {10022FFDA3}>,
#<THREAD "repl-thread" RUNNING {1002300003}>
[Condition of type SB-IMPL::SAVE-WITH-MULTIPLE-THREADS-ERROR]
See also:
SBCL Manual, Saving a Core Image [:node]