I suppose your code is something similar to this:
(def f (future (while true (your-function ... ))))
(future-cancel f)All you have to do as describe in this SO comment is to replace true with (not (Thread/interrupted)). Example:
(future (while (not (Thread/interrupted)) (your-function ... )))Because future-cancel will send interrupt signal to the future, Thread/interrupted will be changed to true. Now your future-cancel should work as expected.