From d50c1349a0f5abc0e110400f0c3315a1809bf813 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Tue, 8 Aug 2017 15:31:18 -0500 Subject: [PATCH] actors.scm: Rename `wrap-apply' to `wrap' and export. * 8sync/actors.scm (wrap): Renamed from wrap-apply and exported. (build-actions): Update call to `wrap'. --- 8sync/actors.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/8sync/actors.scm b/8sync/actors.scm index 05502fd..62a07ac 100644 --- a/8sync/actors.scm +++ b/8sync/actors.scm @@ -81,7 +81,11 @@ <- <-wait - spawn-hive run-hive)) + spawn-hive run-hive + + ;; Maybe the wrong place for this, or for it to be exported. + ;; But it's used in websockets' server implementation at least... + wrap)) ;; For ids (set! *random-state* (random-state-from-platform)) @@ -219,18 +223,18 @@ #:message message)) (apply method actor message (message-body message))) -(define-syntax-rule (wrap-apply body) +(define-syntax-rule (wrap body) "Wrap possibly multi-value function in a procedure, applies all arguments" (lambda args (apply body args))) (define-syntax-rule (build-actions (symbol method) ...) "Construct an alist of (symbol . method), where the method is wrapped -with wrap-apply to facilitate live hacking and allow the method definition +with `wrap' to facilitate live hacking and allow the method definition to come after class definition." (build-rmeta-slot (list (cons (quote symbol) - (wrap-apply method)) ...))) + (wrap method)) ...))) (define-class () ;; An address object... a vector of #(actor-id hive-id inbox-channel dead?) -- 2.31.1