I had a detailed conversion with chatGPT about how to gracefully handle terminating conditions of a rust program. It summarized cogently to register at_exit()’s for each thread, panic handlers, and register signal handlers. It advised and explain in detail on my query about the thread handling for each of these variants, gave really helpful advice on collecting join handles in a closure on the main thread and waiting for the child threads to exit their at_exit handlers since at_exit can’t guarantee when handlers will execute. It went into detail about cases the process won’t have the ability to clean up. I was able to ask it a lot of clarifying questions and it provided useful responses with clear coherent explanations that were salient and considered the full context of the discussion. I’m certain when I go to actually implement it it’ll have gotten so details wrong. But it provided about as clear explanation of process termination mechanics (for Unix) as I’ve seen articulated, and did so in a way that was directed by my questions not in a 300 page reference manual or random semi relevant questions in stackoverflow answered by partially right contributors.
If this is a con, then consider me a mark.