From dfb6ca23c954230bf19e591b45ccd6843387ca01 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Mon, 16 Jun 2025 11:22:56 +0200 Subject: [PATCH] fix: use behavior from task --- core/actor.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/actor.lisp b/core/actor.lisp index 90b7acb..9ba38ae 100644 --- a/core/actor.lisp +++ b/core/actor.lisp @@ -85,7 +85,9 @@ (progn (async:set-status tsk :stopped) nil) (let ((*self* tsk)) (async:set-status tsk :running) - (ac-loop tsk (or (funcall bhv msg) bhv)))) + ;(ac-loop tsk (or (funcall bhv msg) bhv)) + (funcall bhv msg) + (ac-loop tsk (async:behavior tsk)))) (progn (async:set-status tsk :suspended) bhv)))) (defmethod send ((tsk async:restartable-task) msg) @@ -120,7 +122,7 @@ (lambda (msg) ;(format t "calc ~a ~a~%" val (content msg)) (destructuring-bind (fn &optional param) (content msg) - (funcall fn msg val param)))) + (become (funcall fn msg val param))))) (defun plus (msg val param) (calculator (+ val param)))