Here are two issues related to thread management:
1. Signal handling: In a multi-threaded process, it is not clear where a signal should be delivered - to the thread to which the signal applies, to every thread in the process, or to certain threads. Different approaches have trade-offs between flexibility and overhead.
2. Thread cancellation: Terminating a thread before it finishes execution raises challenges. Asynchronous cancellation terminates the thread immediately but can leave shared data in an inconsistent state. Deferred cancellation allows checking for cancellation at safe points but incurs more overhead. The approach and implementation depends on the application needs.
Related topics: