25 |
;; Boston, MA 02111-1307, USA. |
;; Boston, MA 02111-1307, USA. |
26 |
|
|
27 |
;;; Commentary: |
;;; Commentary: |
28 |
|
|
29 |
;; manages receiving a stream asynchronously, |
;; manages receiving a stream asynchronously, |
30 |
;; parsing it into transactions, and then calling |
;; parsing it into transactions, and then calling |
31 |
;; handler functions |
;; handler functions |
49 |
(concat " tq-temp-" |
(concat " tq-temp-" |
50 |
(process-name process))))))) |
(process-name process))))))) |
51 |
(set-process-filter process |
(set-process-filter process |
52 |
(`(lambda (proc string) |
`(lambda (proc string) |
53 |
(tq-filter '(, tq) string)))) |
(tq-filter '(, tq) string))) |
54 |
tq)) |
tq)) |
55 |
|
|
56 |
;;; accessors |
;;; accessors |
68 |
(defun tq-queue-head-closure (tq) (car (cdr (car (tq-queue tq))))) |
(defun tq-queue-head-closure (tq) (car (cdr (car (tq-queue tq))))) |
69 |
(defun tq-queue-empty (tq) (not (tq-queue tq))) |
(defun tq-queue-empty (tq) (not (tq-queue tq))) |
70 |
(defun tq-queue-pop (tq) (setcar tq (cdr (car tq))) (null (car tq))) |
(defun tq-queue-pop (tq) (setcar tq (cdr (car tq))) (null (car tq))) |
71 |
|
|
72 |
|
|
73 |
;;; must add to queue before sending! |
;;; must add to queue before sending! |
74 |
(defun tq-enqueue (tq question regexp closure fn) |
(defun tq-enqueue (tq question regexp closure fn) |