Re: thread resource leaks if thread terminates with uncaught exception
Jens Thiele <[email protected]> Fri, 10 Jan 2025 14:51:08 +0100
| Newsgroups | gmane.lisp.scheme.gauche |
|---|---|
| Message-ID | <[email protected]> |
Shiro Kawai <[email protected]> writes: > Regarding pmap semantics in case of uncaught exception, it is not defined > at all; I guess I thought to leave the caller handle any exceptions within > proc, but that's probably a bad API. From a user point of view it is tempting to have it as close as possible to map. Then one could add a p here and there to parallelize. But maybe this is just a dangerous/bad invitation. I am really not sure what should happen in the case with multiple uncaught exceptions. Collecting them and returning them doesn't look that nice either (and what about the terminated threads)?. Picking one exception raises the question which one? Are there exceptions more important than others? And ignoring exceptions doesn't feel right. Maybe it really should be the callers job as you write. A quick search how others do that, didn't help either. > I'll come back regarding the resource leak. thanks Jens