Re:How to stop Linux threads cleanly
by corsix on Monday January 08, 2024 @11:57AM
(#38914828)
close() is documented as a cancellation point, and is the kind of syscall that might crop up in a destructor.
[ Parent
| on HN ]
Re:How to stop Linux threads cleanly
by otabdeveloper4 on Monday January 08, 2024 @03:01PM
(#38917279)
Indeed a tricky point, but like I said - move these objects to another garbage collection thread and call close() there.
(You probably want to do this regardless, because close() is not actually always an instanteneous syscall and can take a long time.)