diff --git a/core/core.lisp b/core/core.lisp index 0159ba0..887a244 100644 --- a/core/core.lisp +++ b/core/core.lisp @@ -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