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)))