We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99a7542 commit 5fbf3ddCopy full SHA for 5fbf3dd
packages/kmono-build/src/k16/kmono/build.clj
@@ -160,5 +160,17 @@
160
(.release semaphore)))))
161
stage)]
162
163
- (mapv deref op-procs)
+ ;; First deref everything, handling exceptions. This ensures that all
164
+ ;; procs finish before any exceptions are thrown.
165
+ ;;
166
+ ;; Once all procs are complete then throw if any were exceptional.
167
+ (->> op-procs
168
+ (mapv (fn [proc]
169
+ (try
170
+ (deref proc)
171
+ (catch Exception ex ex))))
172
+ (run! (fn [val]
173
+ (when (instance? Exception val)
174
+ (throw val)))))
175
+
176
(recur (rest stages))))))))
0 commit comments