work in progress: use util/async for core:service
This commit is contained in:
parent
4c5639a9b9
commit
c6ec682937
1 changed files with 7 additions and 2 deletions
|
@ -2,7 +2,8 @@
|
|||
|
||||
(defpackage :scopes/core
|
||||
(:use :common-lisp)
|
||||
(:local-nicknames (:config :scopes/config)
|
||||
(:local-nicknames (:async :scopes/util/async)
|
||||
(:config :scopes/config)
|
||||
(:message :scopes/core/message)
|
||||
(:shape :scopes/shape)
|
||||
(:util :scopes/util)
|
||||
|
@ -73,7 +74,8 @@
|
|||
(services :reader services :initform (make-hash-table))))
|
||||
|
||||
(defclass service (context)
|
||||
((mailbox :reader mailbox :initform (lpq:make-queue))))
|
||||
((task :accessor task :initform nil)
|
||||
(mailbox :reader mailbox :initform (lpq:make-queue))))
|
||||
|
||||
(defgeneric do-start (ctx)
|
||||
(:method ((ctx context)))
|
||||
|
@ -100,6 +102,9 @@
|
|||
(defun default-setup (cfg &optional (cls 'context) &rest args &key &allow-other-keys)
|
||||
(apply #'make-instance cls :config cfg :name (config:name cfg) args))
|
||||
|
||||
;;; setup-service
|
||||
;(setf (task child) (async:make-task :handle-message #'handle-message))
|
||||
|
||||
(defun find-service (name &optional (parent *root*))
|
||||
(with-slots (services) parent
|
||||
(when services
|
||||
|
|
Loading…
Add table
Reference in a new issue