diff --git a/core/actor.lisp b/core/actor.lisp index 1a2cce2..97455c1 100644 --- a/core/actor.lisp +++ b/core/actor.lisp @@ -5,7 +5,7 @@ (:local-nicknames (:async :scopes/util/async) (:shape :scopes/shape) (:util :scopes/util)) - (:export #:start #:stop #:become #:create #:send + (:export #:start #:stop #:create #:send #:message #:content #:customer #:*logger* #:*root* #:echo #:inc #:lgi @@ -22,9 +22,6 @@ ((content :reader content :initarg :content :initform nil) (customer :reader customer :initarg :customer :initform nil))) -(defmethod x-print-object ((msg message) stream) - (shape:print-slots msg stream 'content 'customer)) - (defun message (content &optional customer) (make-instance 'message :content content :customer customer)) diff --git a/util/async.lisp b/util/async.lisp index 33675c3..0dcc590 100644 --- a/util/async.lisp +++ b/util/async.lisp @@ -5,7 +5,8 @@ (:local-nicknames (:util :scopes/util) (:lp :lparallel) (:lpq :lparallel.queue)) - (:export #:init #:finish #:make-ch #:make-mb #:rcv #:snd #:submit-task + (:export #:init #:finish #:make-ch #:make-mb #:rcv #:snd + #:submit-task #:receive-result #:task #:make-task #:start #:status #:wait-receive)) (in-package :scopes/util/async) @@ -36,11 +37,11 @@ (defun submit-task (ch job) (lp:submit-task ch job)) -;;;; task class and related functions - (defun receive-result (ch) (lp:receive-result ch)) +;;;; task class and related functions + (defclass task () ((job :reader job :initarg :job) (taskid :reader taskid :initform (gensym "TSK"))