anchor.diff:    (when (null clock)
       (error "cl-patterns clock is NIL; perhaps try (defparameter *clock* (make-clock)) or (start-clock-loop)"))
     (with-slots (tasks tasks-lock) clock
  -    (bt:with-lock-held (tasks-lock)
  +    (bt:with-recursive-lock-held (tasks-lock)
         (let ((task (make-instance 'task :item item :clock clock :start-beat (next-beat-for-quant (quant item) (slot-value clock 'beat)))))
           (setf tasks (append tasks (list task)))
           task))))
  
positive.code: (defun clock-remove (task &optional (clock *clock*))
    "Remove TASK from CLOCK's tasks."
    (with-slots (tasks tasks-lock) clock
      (bt:with-lock-held (tasks-lock)
        (setf tasks
              (remove-if
               (lambda (ctask)
  
negative.code:                                    nil)
                                   (clock-process-task task (1+ times))))
                             nil))))))
        (bt:with-recursive-lock-held ((slot-value clock 'tasks-lock))
          (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
  