What would cause a Clojure program to not immediately exit upon finishing the last statement in the main function?
All I did was to change a (doall (map ...)) to a (doall (pmap ...)), and suddenly the program would hang upon completion of its tasks for a good number of seconds before exiting. I would put a (println "Finished everything!") on the last line of the -main function, and it would print that, yet still not exit for some time. What could cause this behavior, and how should I fix it?
EDIT: The pmap is the only part of the program that is parallelized (mostly because everything else runs more or less instantly). As latter parts of the program require all the results from pmap in order to function correctly, and as the program output is the same for both map and pmap, I somewhat doubt that pmap would still be running at the end of the program. Putting (System/exit 0) at the end instead of the println does not change program output, either.