GNU bug report logs -
#79461
n-par-for-each do not propagate exceptions
Previous Next
To reply to this bug, email your comments to 79461 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#79461
; Package
guile
.
(Wed, 17 Sep 2025 07:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Maxim Cournoyer <maxim <at> guixotic.coop>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Wed, 17 Sep 2025 07:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.