Changeset 94 for branches/home/psmith/restructure/src/protocol/yarpc
- Timestamp:
- 02/22/07 22:50:56 (18 years ago)
- Location:
- branches/home/psmith/restructure/src/protocol/yarpc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/nio-yarpc.asd ¶
r40 r94 11 11 ) 12 12 13 :depends-on (:nio :nio-sm :nio- compat))13 :depends-on (:nio :nio-sm :nio-utils)) -
TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/yarpc-client-state-machine.lisp ¶
r84 r94 34 34 ;; 35 35 (defclass yarpc-client-state-machine (state-machine) 36 ((job-queue :initform (nio- compat:concurrent-queue)36 ((job-queue :initform (nio-utils:concurrent-queue) 37 37 :accessor job-queue 38 38 :documentation "The queue used to hand off work from an external thread to the io thread") … … 75 75 (defmethod process-outgoing-packet((sm yarpc-client-state-machine)) 76 76 #+nio-debug (format-log t "yarpc-client-state-machine:process-outgoing-packet called, polling the job-queue ~%") 77 (let ((ttd (nio- compat:take (job-queue sm) :blocking-call nil)))77 (let ((ttd (nio-utils:take (job-queue sm) :blocking-call nil))) 78 78 (when ttd 79 79 #+nio-debug (format-log t "yarpc-client-state-machine:process-outgoing-packet got job ~A ~%" ttd) … … 95 95 (defmethod remote-execute ((sm yarpc-client-state-machine) call-string callback) 96 96 #+nio-debug (format-log t "yarpc-client-state-machine:remote-execute called :sm ~A :call-string ~A :callback ~A~%" sm call-string callback) 97 (nio- compat:add (job-queue sm) (list (remote-job callback) call-string)))97 (nio-utils:add (job-queue sm) (list (remote-job callback) call-string))) -
TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/yarpc-state-machine.lisp ¶
r93 r94 35 35 (defclass yarpc-state-machine (state-machine) 36 36 ( 37 (result-queue :initform (nio- compat:concurrent-queue)37 (result-queue :initform (nio-utils:concurrent-queue) 38 38 :accessor result-queue 39 39 :documentation "The queue used to return results from an external thread to the nio thread"))) 40 40 41 (defparameter job-queue (nio- compat:concurrent-queue)41 (defparameter job-queue (nio-utils:concurrent-queue) 42 42 "The queue used to hand off work from the NIO thread to an external thread for execution") 43 43 … … 61 61 (defun run-job(&key (blocking t)) 62 62 #+nio-debug (format-log t "yarpc-state-machine:run-job - Server toplevel waiting for job~%") 63 (let ((server-job (nio- compat:take nio-yarpc:job-queue :blocking-call blocking)))63 (let ((server-job (nio-utils:take nio-yarpc:job-queue :blocking-call blocking))) 64 64 (when server-job 65 65 (destructuring-bind (job request-id result-queue) server-job 66 66 #+nio-debug (format-log t "yarpc-state-machine:run-job - Server received job ~A~%" job) 67 (nio- compat:add result-queue (list request-id (nio-yarpc:execute-call job)))))))67 (nio-utils:add result-queue (list request-id (nio-yarpc:execute-call job))))))) 68 68 69 69 70 70 (defmethod process-outgoing-packet((sm yarpc-state-machine)) 71 71 #+nio-debug2 (format-log t "yarpc-state-machine:process-outgoing-packet - called, polling the results-queue ~%" ) 72 (let ((server-job (nio- compat:take (result-queue sm) :blocking-call nil)))72 (let ((server-job (nio-utils:take (result-queue sm) :blocking-call nil))) 73 73 (when server-job 74 74 (destructuring-bind (request-id result) server-job … … 79 79 (defmethod process-incoming-packet ((sm yarpc-state-machine) (call call-method-packet)) 80 80 #+nio-debug (format-log t "yarpc-state-machine:process-incoming-packet - called :sm ~A :packet ~A~%" sm call) 81 (nio- compat:add job-queue (list (call-string call) (request-id call) (result-queue sm)))81 (nio-utils:add job-queue (list (call-string call) (request-id call) (result-queue sm))) 82 82 (when +process-jobs-inline+ (run-job :blocking nil))) 83 83
Note: See TracChangeset
for help on using the changeset viewer.