send-message send-message-wait
reply-message reply-message-wait
+ <- <-wait <-reply <-reply-wait
+
ez-run-hive
bootstrap-message
(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)
+
+
\f
;;; Main actor implementation
;;; =========================
(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)))