[Openmcl-devel] Trouble killing a processes
Michael Minerva
minerva at agentsheets.com
Tue Oct 5 14:26:00 PDT 2010
Hey all,
I have been having trouble killing a process in the application that I am currently working on, so I decided to make a simpler example using just basic ccl methods, and I experience the same problem. I was wondering if anyone could help me understand what is going on. My little program just makes a process which just prints to the console then sleeps in a loop, then I assign this process to a local variable, then I kill the process and print it out. Often times, even after I have issues the command process-kill to the reference to the process, the process continues printing. Sometimes when I print the process after killing it, it says it is still active, sometimes it s says it is exhausted and sometimes it says it is reset. According to the documentation I found about this method it is supposed to "Causes a specified process to cleanly exit from any ongoing computation, and then exit.". Can anyone help me understand why this is not happening? Here is my example program. If you try it out make sure to run it many times because it will often work correctly on the first try. Also, when you see the behavior I have been experiencing you will need to quit ccl to end the process.
(defun make-a-process()
(process-run-function
'(:name "my-process" :priority 1)
#'(lambda ()
(loop
(print "doing process things.")
(print *current-process*)
(sleep .01)))))
(defun process-test ()
(let ((my-process
(make-a-process)))
(print "kill process")
(process-kill my-process)
(print *current-process*)
(print "after kill")
(print my-process)
nil))
(process-test)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20101005/1a7451af/attachment.htm>
More information about the Openmcl-devel
mailing list