anchor.diff:    ((beat :initform 0 :documentation "The number of beats that have elapsed since the creation of the clock.")
      (tempo :initarg :tempo :initform 1 :reader tempo :documentation "The tempo of the clock, in beats per second.")
      (tasks :initform nil :documentation "The list of tasks that are running on the clock.")
  -   (tasks-lock :initform (bt:make-lock) :documentation "The lock on the tasks to make the clock thread-safe.")
  +   (tasks-lock :initform (bt:make-recursive-lock) :documentation "The lock on the tasks to make the clock thread-safe.")
      (timestamp-at-tempo :initform (local-time:now) :documentation "The local-time timestamp when the tempo was last changed.")
      (beat-at-tempo :initform 0 :documentation "The number of beats on the clock when the tempo was last changed."))
     (:documentation "A musical time-based clock defining a tempo and pulse that its tasks synchronize to."))
  
positive.code:                                    nil)
                                   (clock-process-task task (1+ times))))
                             nil))))))
        (dolist (task (slot-value clock 'tasks))
          (restart-case
              (unless (clock-process-task task)
                (clock-remove task clock))
            (skip-event ()
              :report "Skip this event, preserving the task on the clock so it can be run again."
              nil)
            (remove-task ()
              :report "Remove this task from the clock."
              (clock-remove task clock)))))
      (incf (slot-value clock 'beat) beats)))
  
  ;;; basic clock-loop convenience functionality
  
negative.code: (defun clock-remove (task &optional (clock *clock*))
    "Remove TASK from CLOCK's tasks."
    (with-slots (tasks tasks-lock) clock
      (bt:with-recursive-lock-held (tasks-lock)
        (setf tasks
              (remove-if
               (lambda (ctask)
  