From: Christopher Allan Webber Date: Fri, 16 Dec 2016 17:00:09 +0000 (-0600) Subject: actors: Remove wrap-apply from actor-inheritable-message-handler call. X-Git-Tag: v0.3.0~6 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=0e4825bbf6409fb438c9dd69f0d4857b9e22222a;p=8sync.git actors: Remove wrap-apply from actor-inheritable-message-handler call. * 8sync/systems/actors.scm (actor-inheritable-message-handler): Move location. (): Switch init-value of actor-inheritable-message-handler to drop wrap-apply. --- diff --git a/8sync/systems/actors.scm b/8sync/systems/actors.scm index debb606..52b1877 100644 --- a/8sync/systems/actors.scm +++ b/8sync/systems/actors.scm @@ -228,25 +228,6 @@ ;;; Main actor implementation ;;; ========================= -(define-class () - ;; An address object - (id #:init-keyword #:id - #:getter actor-id) - ;; The hive we're connected to. - ;; We need this to be able to send messages. - (hive #:init-keyword #:hive - #:accessor actor-hive) - ;; How we receive and process new messages - (message-handler #:init-value (wrap-apply actor-inheritable-message-handler) - ;; @@: There's no reason not to use #:class instead of - ;; #:each-subclass anywhere in this file, except for - ;; Guile bug #25211 (#:class is broken in Guile 2.2) - #:allocation #:each-subclass) - - ;; This is the default, "simple" way to inherit and process messages. - (actions #:init-value '() - #:allocation #:each-subclass)) - (define (actor-inheritable-message-handler actor message) (define action (message-action message)) (define (find-message-handler return) @@ -270,6 +251,25 @@ (call/ec find-message-handler)) (apply method actor message (message-body message))) +(define-class () + ;; An address object + (id #:init-keyword #:id + #:getter actor-id) + ;; The hive we're connected to. + ;; We need this to be able to send messages. + (hive #:init-keyword #:hive + #:accessor actor-hive) + ;; How we receive and process new messages + (message-handler #:init-value actor-inheritable-message-handler + ;; @@: There's no reason not to use #:class instead of + ;; #:each-subclass anywhere in this file, except for + ;; Guile bug #25211 (#:class is broken in Guile 2.2) + #:allocation #:each-subclass) + + ;; This is the default, "simple" way to inherit and process messages. + (actions #:init-value '() + #:allocation #:each-subclass)) + (define-method (actor-message-handler (actor )) (slot-ref actor 'message-handler))