code clean-up, minor improvements
This commit is contained in:
parent
f45d152e47
commit
1b4ad4c9c4
2 changed files with 5 additions and 7 deletions
|
@ -5,7 +5,7 @@
|
||||||
(:local-nicknames (:async :scopes/util/async)
|
(:local-nicknames (:async :scopes/util/async)
|
||||||
(:shape :scopes/shape)
|
(:shape :scopes/shape)
|
||||||
(:util :scopes/util))
|
(:util :scopes/util))
|
||||||
(:export #:start #:stop #:become #:create #:send
|
(:export #:start #:stop #:create #:send
|
||||||
#:message #:content #:customer
|
#:message #:content #:customer
|
||||||
#:*logger* #:*root*
|
#:*logger* #:*root*
|
||||||
#:echo #:inc #:lgi
|
#:echo #:inc #:lgi
|
||||||
|
@ -22,9 +22,6 @@
|
||||||
((content :reader content :initarg :content :initform nil)
|
((content :reader content :initarg :content :initform nil)
|
||||||
(customer :reader customer :initarg :customer :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)
|
(defun message (content &optional customer)
|
||||||
(make-instance 'message :content content :customer customer))
|
(make-instance 'message :content content :customer customer))
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
(:local-nicknames (:util :scopes/util)
|
(:local-nicknames (:util :scopes/util)
|
||||||
(:lp :lparallel)
|
(:lp :lparallel)
|
||||||
(:lpq :lparallel.queue))
|
(: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))
|
#:task #:make-task #:start #:status #:wait-receive))
|
||||||
|
|
||||||
(in-package :scopes/util/async)
|
(in-package :scopes/util/async)
|
||||||
|
@ -36,11 +37,11 @@
|
||||||
(defun submit-task (ch job)
|
(defun submit-task (ch job)
|
||||||
(lp:submit-task ch job))
|
(lp:submit-task ch job))
|
||||||
|
|
||||||
;;;; task class and related functions
|
|
||||||
|
|
||||||
(defun receive-result (ch)
|
(defun receive-result (ch)
|
||||||
(lp:receive-result ch))
|
(lp:receive-result ch))
|
||||||
|
|
||||||
|
;;;; task class and related functions
|
||||||
|
|
||||||
(defclass task ()
|
(defclass task ()
|
||||||
((job :reader job :initarg :job)
|
((job :reader job :initarg :job)
|
||||||
(taskid :reader taskid :initform (gensym "TSK"))
|
(taskid :reader taskid :initform (gensym "TSK"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue