You are not logged in.
Pages: 1
Hello!
I'm trying to do some more advanced things using threads and I don't exactly understand how cancellation points work. I read, that POSIX defines many function as cancellation points (accept(), select(), send() etc.) and also POSIX threads provides pthread_testcancel (). I don't exactly understand when exactly cancellation process is started for threads configured with PTHREAD_CANCEL_DEFERRED option.
One of cancellation points is send() function. Sample pseudocode executed inside thread:
while (1)
{
send ();
}
What happens when send() is sending some data and I cancel this thread from other place in program. send() execution is canceled immediately and thread exits or cancellation is deferred until next loop iteration?
Offline
Pages: 1