(message (make-message (hive-gen-message-id hive) to-id
(actor-id from-actor) action
(kwarg-list-to-alist message-body-args))))
(message (make-message (hive-gen-message-id hive) to-id
(actor-id from-actor) action
(kwarg-list-to-alist message-body-args))))
(define (send-message-wait from-actor to-id action . message-body-args)
"Send a message from an actor to another, but wait until we get a response"
(define (send-message-wait from-actor to-id action . message-body-args)
"Send a message from an actor to another, but wait until we get a response"
(actor-id from-actor) '*reply*
(kwarg-list-to-alist message-body-args)
#:in-reply-to (message-id original-message))))
(actor-id from-actor) '*reply*
(kwarg-list-to-alist message-body-args)
#:in-reply-to (message-id original-message))))
(define-method (hive-process-message (hive <hive>) message)
"Handle one message, or forward it via an ambassador"
(define-method (hive-process-message (hive <hive>) message)
"Handle one message, or forward it via an ambassador"
;; @@: Why not just use with-throw-handler and let the catch
;; happen at the agenda? That's what we used to do, but
;; it ended up with a SIGABRT. See:
;; @@: Why not just use with-throw-handler and let the catch
;; happen at the agenda? That's what we used to do, but
;; it ended up with a SIGABRT. See:
(define-method (hive-register-actor! (hive <hive>) (actor <actor>))
(hash-set! (hive-actor-registry hive) (actor-id actor) actor))
(define-method (hive-register-actor! (hive <hive>) (actor <actor>))
(hash-set! (hive-actor-registry hive) (actor-id actor) actor))