From owner-freebsd-hackers Tue Dec 1 21:20:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA09571 for freebsd-hackers-outgoing; Tue, 1 Dec 1998 21:20:44 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA09532 for ; Tue, 1 Dec 1998 21:20:38 -0800 (PST) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.9.1/8.9.1) id QAA07636; Wed, 2 Dec 1998 16:28:15 +1100 (EST) (envelope-from jb) From: John Birrell Message-Id: <199812020528.QAA07636@cimlogic.com.au> Subject: Re: pthread_cancel() function... In-Reply-To: from The Hermit Hacker at "Dec 2, 98 00:57:14 am" To: scrappy@hub.org (The Hermit Hacker) Date: Wed, 2 Dec 1998 16:28:15 +1100 (EST) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The Hermit Hacker wrote: > Very sure, but the developer has been *very* receptive to fixes > and patches that I've sent him...what would you suggest? Just replace > with pthread_detach() if pthread_cancel() doesn't exist? Or something > altogether different? pthread_detach() just indicates to the system that the thread exit status and thread resources can be thrown away. The normal thing for one thread to do is to discover (by some mechanism, usually by accessing shared data) that another thread has exited. The running thread then joins to the other thread to get it's exit status and then detaches it. This is very different to pthread_cancel() which is intended for use when one thread wants to play god over other threads. If your application requires pthread_cancel() because there is no other means for the 'god' thread to tell other threads to exit, then we need to implement pthread_cancel(). 8-) Can you send me the URL for the application so I can have a look at how the thread cancellation is coded? This shouldn't be necessary, but experience has proven otherwise. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message