Resetting an Allegroserve worker process
JP Massar <[email protected]> Mon, 01 Mar 2004 12:33:59 -0800
| Newsgroups | gmane.lisp.open-source.franz |
|---|---|
| Message-ID | <[email protected]> |
Suppose that I have put an Allegroserve worker process into an infinite loop, or it's doing some computation I decide to terminate. Suppose the worker process I want to decommission is <p>. The tests I've run using Allegro 6.2 on Windows with localhost show the following behavior: If I do an mp:process-kill on <p>, that destroys the worker process, but restarts the computation using another worker process! If I do an mp:process-reset on <p> the process resets, but it also restarts the computation. There seems to be no way to just terminate and stop! An example: Let's say I have <p> performing the following computation deep inside a servlet that <p> invokes to handle a particular published URL: (dotimes (j 180) (sleep 1) (setq *foo* (list j (incf *xcount*))) where I have independently setq'ed *xcount* to 0 previously. So I can examine *xcount* from another thread, and of course its value increases once a second. Now if I do (mp:process-kill <p>) when, say *foo* = (60 61) <p> goes away. If I examine *foo* it looks something like (4 65). If I examine it again it looks like, e.g., (6 67) The list of processes shows that <p> (one of the worker processes) is gone, but another one is running. If I instead do (mp:process-reset <p>) the same kind of thing happens to *foo* but <p> does not go away. Now, assuming I have not gone insane (because this behavior is quite counterintuitive, especially wrt mp:process-kill) and this is indeed what is happening, and assuming that I have no way of inserting test code into my loop that is running in <p>, to test some dynamic termination flag, is there any way I can just get the worker process to stop itself and Allegroserve not to restart the computation?