This is the mail archive of the pthreads-win32@sourceware.org mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: cancellation API


On Friday, December 20, 2013 at 9:50 AM, Roger Park wrote:
> After a bit of googling, i was still a bit confused.  Does the win32-pthreads api
> support cancellation for things like recv() from sockets or not? (I assume the
> standard pthreads does?) Thank you, just wondering.

There is no special awareness of thread context from within the recv() (or any networking APIs).  So, canceling would be potentially problematic.  However, from my experience, if another thread closes the socket which the thread you're concerned with is reading on, the read will complete with an error.  The reading thread can then clean up and exit on its own.

- Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]