How to cancel a thread safely from the initial thread?

how about asynchronous canceling?
or with signal?
if with signal whether it effects the process?
my english so badly :frowning: :frowning:

Assuming POSIX & AIX threads Try: