From f498b0cf78158077e974d03a5b58ec54221cb05f Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Mon, 16 Jun 2025 19:21:42 +0200 Subject: [PATCH] code clean-up - remove obsolete stuff after release of restartable tasks --- core/actor.lisp | 8 +++----- core/core.lisp | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/actor.lisp b/core/actor.lisp index 5f849ac..6ff2809 100644 --- a/core/actor.lisp +++ b/core/actor.lisp @@ -68,12 +68,10 @@ (defgeneric send (tsk msg) (:method ((tsk async:mailbox) msg) - ;(util:lgi msg) (async:snd tsk msg))) (defun become (bhv) - (set-bhv *self* bhv) - bhv) + (set-bhv *self* bhv)) ;;;; handling restartable tasks @@ -82,13 +80,13 @@ (multiple-value-bind (msg ok) (async:try-rcv tsk) (if ok (if (eq (content msg) +quit-message+) - (progn (async:set-status tsk :stopped) nil) + (async:set-status tsk :stopped) (progn (async:set-status tsk :running) (let ((*self* tsk)) (funcall bhv msg) (ac-loop tsk (async:behavior tsk))))) - (progn (async:set-status tsk :suspended) bhv)))) + (async:set-status tsk :suspended)))) (defmethod send ((tsk async:restartable-task) msg) (let ((status (async:get-status tsk))) diff --git a/core/core.lisp b/core/core.lisp index ee63d86..fbfb4a4 100644 --- a/core/core.lisp +++ b/core/core.lisp @@ -100,8 +100,7 @@ (dolist (ctx (alx:hash-table-values (services *root*))) (funcall (config:shutdown (config ctx)) ctx)) ;(actor:stop *root*) - (async:finish) -) + (async:finish)) (defun add-action (ctx pat hdlr) (let* ((acts (actions ctx))