I am trying to create a process that uses a let*
. When I try to run it, the child process is in a [reset] state. If I use a workaround and use let
, the thread starts out as [active] everything works fine.
I am puzzled at this behavior and would love an explanation.
(defparameter *g* 1)
(defparameter *res-list* nil)
(defun tester ()
(let ((res *g*))
(push res *res-list*)))
CL-USER> (ccl:process-run-function "test" 'tester)
#<PROCESS test(4856) [Active] #x3020036E30AD>
CL-USER> *res-list*
(1)
Everything works so far. But if I change the let to let*, I get a [reset] state, but the code within the child thread is executed.
(defun tester ()
(let* ((res *g*))
(push res *res-list*)))
CL-USER> (ccl:process-run-function "test" 'tester)
#<PROCESS test(4862) [Reset] #x3020036BCF2D>
CL-USER> *res-list*
(1 1)
I would also be thankful if someone could point me to a resource which would explain the different states.
Thanks.