Hacker News new | ask | show | jobs
by corsix 894 days ago
close() is documented as a cancellation point, and is the kind of syscall that might crop up in a destructor.
1 comments

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.)