thread-stopper

clojure.repl

  • (thread-stopper)
  • (thread-stopper thread)
Returns a function that takes one arg and uses that as an exception message
to stop the given thread. Defaults to the current thread

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/repl.clj:270 top

(defn thread-stopper
  "Returns a function that takes one arg and uses that as an exception message
  to stop the given thread.  Defaults to the current thread"
  ([] (thread-stopper (Thread/currentThread)))
  ([thread] (fn [msg] (.stop thread (Error. msg)))))
Vars in clojure.repl/thread-stopper:
Used in 0 other vars

Comments top

No comments for thread-stopper. Log in to add a comment.