fix: use behavior from task

This commit is contained in:
Helmut Merz 2025-06-16 11:22:56 +02:00
parent 02c8e68ced
commit dfb6ca23c9

View file

@ -85,7 +85,9 @@
(progn (async:set-status tsk :stopped) nil) (progn (async:set-status tsk :stopped) nil)
(let ((*self* tsk)) (let ((*self* tsk))
(async:set-status tsk :running) (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)))) (progn (async:set-status tsk :suspended) bhv))))
(defmethod send ((tsk async:restartable-task) msg) (defmethod send ((tsk async:restartable-task) msg)
@ -120,7 +122,7 @@
(lambda (msg) (lambda (msg)
;(format t "calc ~a ~a~%" val (content msg)) ;(format t "calc ~a ~a~%" val (content msg))
(destructuring-bind (fn &optional param) (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) (defun plus (msg val param)
(calculator (+ val param))) (calculator (+ val param)))