anchor.diff:      :documentation "Whether or not a process has been set up.")
      (queued :accessor process-queued :initform nil
       :documentation "Whether or not a process has been queued to run.")
  +   (timer :accessor process-timer :initform (list :last-run 0
  +                                                  :timeout nil
  +                                                  :function nil
  +                                                  :event nil)
  +    :documentation "Holds information regarding the process timing out.")
      (mailbox :accessor process-mailbox :initform (make-queue)
       :documentation "The place we check for messages.")
      (message-callback :accessor process-message-callback :initform nil
  
positive.code:   `(bt:with-lock-held ((getf (process-locks ,process) ,field))
       ,@body))
  
  (defun generate-process-id ()
    "Get a new process ID (unique)."
    (bt:with-lock-held (*next-id-lock*)
  
negative.code:         (msg-callback (proclock (process :message-callback) (process-message-callback process))))
      (if (and mailbox msg-callback)
          (handler-case
            (let ((processed-messages nil))
              ;; grab all our pending messages and process them
              (loop while (not (jpl-queues:empty? mailbox)) do
                (let ((message (jpl-queues:dequeue mailbox)))
                  (setf processed-messages t)
                  ;; so we don't timeout prematurely...
                  (setf (timerdata process :last-run) (get-internal-real-time))
                  (funcall msg-callback message)))
              ;; if messages were processed, reset the timeout timer (if we've got
              ;; one)
              (when (and (timerdata process :timeout)
                         processed-messages)
                (reset-timeout process))
              ;; mark the process as no longer queued (can now be activate again)
              (proclock (process :queued) (setf (process-queued process) nil)))
            (t (e) (log:error "process: message poller: ~a" e)))
  