Chris Angelico wrote:
On Sat, Dec 23, 2017 at 2:11 AM, Henrik Grubbstr??m (Lysator) @ Pike
Using _destruct() for this kind of stuff is NOT a good idea as it gets called in a signal context.
Hmm. But there needs to be _something_ to cope with object abandonment, otherwise a long-running process risks leaking resources. So what SHOULD apps do? Not forgetting that an app may have to support
I'd say, just doing it in _destruct() is fine, as long as you keep in mind that you should avoid things that could block on something. I.e. things that have to wait for a mutex which can block for an indetermined amount of time should not be done from _destruct(). Also, anything running from _destruct() should be thread-safe.