 (defn cancel-auto-bind
   "Stop any [[auto-bind]] which may be in effect."
   []
-  (swap! auto-bind-handler (fn [former-handler]
+  (swap! auto-bind-handler (fn [former-handler]  ; Stop noticing new device connections
                              (when former-handler
                                (amidi/remove-new-device-handler! former-handler))
-                             nil)))
+                             nil))
+  (.add bind-queue [nil nil :done]))  ; Tell the auto-bind thread to shut down

        (catch Exception e
          (timbre/error e "Problem binding to controller"))))

    ;; Wait for the next candidate device
    (recur (.take bind-queue))))

(defonce ^:private ^{:doc "The thread used to run [[bind-bottleneck]]."}
  auto-bind-thread
  (atom nil))

(defn- start-auto-bind-thread
  "Creates the thread used to serialize auto-bind attempts."

  which rely on controller implementations need to call this function
  to ensure loading has occurred. After the first call, the list of
  namespaces will be replaced by `nil`, so it will no longer do
  anything."
  []
  (swap! built-in-controllers
         (fn [namespaces]
           (doseq [n namespaces]
