X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=8sync%2Fsystems%2Factors.scm;h=e33a88b3658eb514da2dd21b04d85e1f6305f322;hp=9009d301470a1c9872fd32cfe306b5f1b1b1653d;hb=15d004d6a653a4302deae1a64a516b3ebb0da873;hpb=9414dea358e9067f1d333650df1a228dcc4bf378 diff --git a/8sync/systems/actors.scm b/8sync/systems/actors.scm index 9009d30..e33a88b 100644 --- a/8sync/systems/actors.scm +++ b/8sync/systems/actors.scm @@ -71,6 +71,8 @@ send-message send-message-wait reply-message reply-message-wait + <- <-wait <-reply <-reply-wait + ez-run-hive bootstrap-message @@ -246,6 +248,16 @@ If key not found and DFLT not provided, throw an error." (abort-to-prompt abort-to from-actor new-message))) +;;; Aliases! +;;; See: http://mumble.net/~jar/articles/oo-moon-weinreb.html +;;; (also worth seeing: http://mumble.net/~jar/articles/oo.html ) + +(define <- send-message) +(define <-wait send-message-wait) +(define <-reply reply-message) +(define <-reply-wait reply-message-wait) + + ;;; Main actor implementation ;;; ========================= @@ -472,13 +484,12 @@ more compact following syntax: (call-with-prompt (hive-prompt hive) thunk (lambda (kont actor message) - (let ((hive (actor-hive actor))) - ;; Register the coroutine - (hash-set! (hive-waiting-coroutines hive) - (message-id message) - (cons (actor-id actor) kont)) - ;; Send off the message - (8sync (hive-process-message hive message)))))) + ;; Register the coroutine + (hash-set! (hive-waiting-coroutines hive) + (message-id message) + (cons (actor-id actor) kont)) + ;; Send off the message + (8sync (hive-process-message hive message))))) (define (process-local-message) (let ((actor (resolve-actor-to)))