GNU bug report logs -
#79461
n-par-for-each do not propagate exceptions
Previous Next
Full log
View this message in rfc822 format
Hi,
The documentation of `n-par-for-each' (info "(guile) Parallel Forms")
does not mention that errors thrown in the procedure run in parallel are
absorbed, instead of relayed to the control code to be handled.
Here's an example:
--8<---------------cut here---------------start------------->8---
(use-modules (srfi srfi-26) (ice-9 threads))
(n-par-for-each 10 (cut error <>) '(a b c d e f g h i j))
;; Produces:
In thread:
In thread:In thread:a
b
In thread:
c
In thread:
d
In thread:
e
In thread:
f
In thread:
In thread:
h
g
In thread:
i
In thread:
j
--8<---------------cut here---------------end--------------->8---
The errors are printed but the exception does not cause the whole
program to be aborted.
This makes this (and I assume other similar) parallel forms unpractical
for situations where errors may happen and must be handled at the top
level.
--
Thanks,
Maxim
This bug report was last modified 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.