mp:interrupt-process
— Interrupt a task.
(mp:interrupt-process
process
function)
| An object of type
|
| A function, which is to be executed in the interrupted process. |
This function sends a signal to a running task. When the task is
free to process that signal, it will stop whatever it is doing and
execute the given function
.
Kill a task that is doing nothing (See mp:process-kill
).
(flet ((task-to-be-killed () (loop (sleep 1)) ; Infinite loop )) (let ((task (mp:process-run-function 'background #'task-to-be-killed))) (sleep 10) (mp:interrupt-process task 'mp:exit-process)))