- Timestamp:
- 01/19/07 02:07:22 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/yarpc-state-machine.lisp ¶
r41 r45 1 #|1 \#| 2 2 Copyright (c) 2007 3 3 All rights reserved. … … 53 53 (defconstant STATE-SEND-RESPONSE 1) 54 54 55 56 (defparameter +process-jobs-inline+ t 57 "Set this to make the NIO thread process the RPC calls - warning the procedure should not block!") 58 59 60 61 (defun run-job(&key (wait-on-job-pdw t)) 62 (format t "~A Server toplevel waiting for job~%" (nio-compat:get-readable-time)) 63 (destructuring-bind (job result-queue) (nio-compat:take nio-yarpc:job-queue :blocking-call wait-on-job-pdw) 64 (format t "~A Server received job ~A~%" (nio-compat:get-readable-time) job) 65 (nio-compat:add result-queue (nio-yarpc:execute-call job)))) 66 67 55 68 (defmethod process-outgoing-packet((sm yarpc-state-machine)) 56 69 (format t "yarpc-state-machine: process-outgoing-packet called, polling the results-queue ~%") … … 64 77 (assert (eql (state sm) STATE-INITIALISED)) 65 78 (format t "yarpc-state-machine:process-incoming-packet called :sm ~A :packet ~A~%" sm call) 66 (nio-compat:add job-queue (list (call-string call) (result-queue sm)))) 79 (nio-compat:add job-queue (list (call-string call) (result-queue sm))) 80 (when +process-jobs-inline+ (run-job :wait-on-job-pdw nil))) 67 81 68 82
Note: See TracChangeset
for help on using the changeset viewer.