csys: fixes and improvements
This commit is contained in:
parent
cd30c9226e
commit
4d37117339
2 changed files with 7 additions and 11 deletions
|
|
@ -14,7 +14,7 @@
|
|||
#:handle-action #:basic-actions #:forward #:notify
|
||||
#:no-op #:printer #:value-add #:create #:connect
|
||||
#:multiply
|
||||
#:send-create #:send-connect))
|
||||
#:send-message #:send-create #:send-connect))
|
||||
|
||||
(in-package :scopes/csys)
|
||||
|
||||
|
|
@ -198,13 +198,10 @@
|
|||
`(:addr ,(list domain cat loc))
|
||||
`(:categ ,(list domain cat)))))
|
||||
(setf args (alx:remove-from-plist args :domain :cat :loc))
|
||||
(actor:send cell
|
||||
(message:create (list domain :create) :data (append args+ args)))))
|
||||
(send-message cell (list domain :create) (append args+ args))))
|
||||
|
||||
(defun send-connect (cell target &key op (domain :csys))
|
||||
(actor:send cell
|
||||
(message:create (list domain :connect)
|
||||
:data (list :target target :op op))))
|
||||
(send-message cell (list domain :connect) (list :target target :op op)))
|
||||
|
||||
(defun printer ()
|
||||
(actor:create (lambda (msg) (print msg))))
|
||||
|
|
|
|||
|
|
@ -47,8 +47,9 @@
|
|||
(register-cell cells (list :env cat loc) ct)))))
|
||||
|
||||
(defun proc-contact (msg scope)
|
||||
(setf (nth 3 (shape:head msg)) (loc scope))
|
||||
(actor:send (csys:environ scope) msg))
|
||||
(let ((head (copy-list (shape:head msg))))
|
||||
(setf (nth 3 head) (loc scope))
|
||||
(csys:send-message (csys:environ scope) head (shape:data msg))))
|
||||
|
||||
;;;; action handlers
|
||||
|
||||
|
|
@ -69,9 +70,7 @@
|
|||
(let* ((ct-addr (cons :env (cdr addr)))
|
||||
(ct (find-cell (cells scope) ct-addr)))
|
||||
(when ct (csys:send-connect new ct)))
|
||||
;(csys:send-message new (list (message:domain msg) :next) :data data)
|
||||
(actor:send new
|
||||
(message:create (list (message:domain msg) :next) :data data))
|
||||
(csys:send-message new (list (message:domain msg) :next) data)
|
||||
nil))
|
||||
|
||||
(defun forward (msg scope)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue