[SPAM] - FW: RE: [c++-pthreads] Re: I'm Lost - Email found in subject

Alexander Terekhov terekhov at web.de
Wed Jul 27 19:20:51 UTC 2005


Ted Baker wrote:
[...]
> Of course, polling won't help with cases where a thread is stuck
> on a blocking system call, but then one does
> have (dare I say it?)  pthread_kill().

You mean EINTR "cancellation" hack? You'd need a pselect()-like 
logic and sigmask arguments

   If sigmask is not a null pointer, then the pselect() function 
   shall replace the signal mask of the caller by the set of 
   signals pointed to by sigmask before examining the descriptors, 
   and shall restore the signal mask of the calling thread before 
   returning.

added to all blocking system calls to make that castrated 
"cancellation" really work (not being subject to a race with 
respect to reaching interruptible state and signal delivery).

regards,
alexander.




More information about the c++-pthreads mailing list