Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Using ExecutorCompletionService is a good suggestion. On the other hand your code would not work, because it ignores the laziness of map: none of the tasks will get submitted and the .take call will block forever. Commented Oct 30, 2013 at 15:16
  • thanks for the input regarding map; I hadn't noticed that. I suppose I could just wrap the map call in doall? Commented Oct 30, 2013 at 15:55
  • exactly, you have to wrap them in doall. I case of the .cancel calls, using a doseq would be even more idiomatic. Commented Oct 30, 2013 at 16:22