[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

where is eval-enqueue's queue? (was: Free from appleEvents pr)



On Wed Jun 30 10:44, jonathan kaye writes:
 This prompted one question I've had through our development: how can
one access the list on which eval-enqueue pushes its stuff?

The global variable *eval-queue* contains the enqueued forms. Here's
a complete example. Notice that push-forms pushes forms onto the eval-queue
while pop-form prints the length of the queue and the contents:

mark

(defun push-forms (n)
    (loop for i from 1 to n
          do (eval-enqueue `(pop-form))))
(defun pop-form ()
    (print-db (length *eval-queue*) *eval-queue*))

? (push-forms 8)
NIL

(LENGTH *EVAL-QUEUE*) 7
*EVAL-QUEUE* (#1=(POP-FORM) #1# #1# #1# #1# #1# #1#)

(LENGTH *EVAL-QUEUE*) 6
*EVAL-QUEUE* (#1=(POP-FORM) #1# #1# #1# #1# #1#)

(LENGTH *EVAL-QUEUE*) 5
*EVAL-QUEUE* (#1=(POP-FORM) #1# #1# #1# #1#)

(LENGTH *EVAL-QUEUE*) 4
*EVAL-QUEUE* (#1=(POP-FORM) #1# #1# #1#)

(LENGTH *EVAL-QUEUE*) 3
*EVAL-QUEUE* (#1=(POP-FORM) #1# #1#)

(LENGTH *EVAL-QUEUE*) 2
*EVAL-QUEUE* (#1=(POP-FORM) #1#)

(LENGTH *EVAL-QUEUE*) 1
*EVAL-QUEUE* ((POP-FORM))

(LENGTH *EVAL-QUEUE*) 0
*EVAL-QUEUE* NIL