public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: Mark Pizzolato - pthreads - win32	<MarkPizzolato-pthreads-win32@subscriptions.pizzolato.net>
To: Roger Pack <rogerdpack2@gmail.com>,
	pthreads-win32	<pthreads-win32@sourceware.org>
Subject: RE: cancellation API
Date: Fri, 20 Dec 2013 17:57:00 -0000	[thread overview]
Message-ID: <0CC6789C1C831B4C8CCFF49D45D7010F0127D510510E@REDROOF2.alohasunset.com> (raw)
In-Reply-To: <CAL1QdWeVXV2CguLFXGhxtF8AqSoAzHx7yxL9BwJn79TVhFZUww@mail.gmail.com>

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

  reply	other threads:[~2013-12-20 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 17:49 Roger Pack
2013-12-20 17:57 ` Mark Pizzolato - pthreads - win32 [this message]
     [not found]   ` <CAL1QdWehMtvsQ=RMo=-m1omtax=tADA97Eg320-gjFhzGXNRZQ@mail.gmail.com>
2013-12-31 16:15     ` Roger Pack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0CC6789C1C831B4C8CCFF49D45D7010F0127D510510E@REDROOF2.alohasunset.com \
    --to=markpizzolato-pthreads-win32@subscriptions.pizzolato.net \
    --cc=pthreads-win32@sourceware.org \
    --cc=rogerdpack2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).