From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30569 invoked by alias); 20 Dec 2013 17:57:05 -0000 Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org Received: (qmail 30560 invoked by uid 89); 20 Dec 2013 17:57:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=BAYES_20,SPF_HELO_FAIL,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail.alohasunset.com Received: from mail.alohasunset.com (HELO mail.alohasunset.com) (50.242.79.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Dec 2013 17:57:03 +0000 Received: from ASSP-nospam ([127.0.0.1]) by alohasunset.com with MailEnable ESMTP; Fri, 20 Dec 2013 09:57:00 -0800 Received: from 127.0.0.1 ([127.0.0.1] helo=REDROOF2.alohasunset.com) by ASSP-nospam id n5b+=V3=subscriptions.pizzolato.net=markpizzolato-pthreads-win32; Fri, 20 Dec 2013 09:57:00 -0800 Received: from REDROOF2.alohasunset.com ([fe80::a53f:c3c2:9c31:9b20]) by REDROOF2.alohasunset.com ([fe80::a53f:c3c2:9c31:9b20%15]) with mapi; Fri, 20 Dec 2013 09:57:00 -0800 From: Mark Pizzolato - pthreads - win32 To: Roger Pack , pthreads-win32 Date: Fri, 20 Dec 2013 17:57:00 -0000 Subject: RE: cancellation API Message-ID: <0CC6789C1C831B4C8CCFF49D45D7010F0127D510510E@REDROOF2.alohasunset.com> References: In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2013/txt/msg00027.txt.bz2 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-pthr= eads api > support cancellation for things like recv() from sockets or not? (I assum= e 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. How= ever, from my experience, if another thread closes the socket which the thr= ead you're concerned with is reading on, the read will complete with an err= or. The reading thread can then clean up and exit on its own. - Mark