From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: thread cancellation, take 2 Date: Wed, 26 Sep 2007 06:03:15 +0200 Organization: LAAS-CNRS Message-ID: <87ejgmnke4.fsf@laas.fr> References: <2bc5f8210709200730q61d7973ft8d1da14889efb2f1@mail.gmail.com> <87abrhl604.fsf@laas.fr> <2bc5f8210709200836i1267bcc8qa066b4d27f2c3e2@mail.gmail.com> <2bc5f8210709222216rf7aa8ednd380fa8db2975073@mail.gmail.com> <87vea1oe70.fsf@chbouib.org> <2bc5f8210709231139x4ed56fc4q9ae28afdb707457b@mail.gmail.com> <87k5qg2ssf.fsf@laas.fr> <2bc5f8210709240839k3069f572ne54d10f44680671@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1190779412 28304 80.91.229.12 (26 Sep 2007 04:03:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Sep 2007 04:03:32 +0000 (UTC) Cc: guile-devel@gnu.org To: "Julian Graham" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Sep 26 06:03:28 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IaO7T-0001UA-IY for guile-devel@m.gmane.org; Wed, 26 Sep 2007 06:03:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IaO7Q-0002Tm-Bi for guile-devel@m.gmane.org; Wed, 26 Sep 2007 00:03:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IaO7N-0002Td-Ui for guile-devel@gnu.org; Wed, 26 Sep 2007 00:03:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IaO7J-0002T3-AW for guile-devel@gnu.org; Wed, 26 Sep 2007 00:03:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IaO7J-0002T0-85 for guile-devel@gnu.org; Wed, 26 Sep 2007 00:03:17 -0400 Original-Received: from laas.laas.fr ([140.93.0.15]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IaO7I-00067J-LM for guile-devel@gnu.org; Wed, 26 Sep 2007 00:03:16 -0400 Original-Received: from messiaen.laas.fr (messiaen [IPv6:2001:660:6602:0:230:65ff:fed4:9d20]) by laas.laas.fr (8.13.8/8.13.8) with SMTP id l8Q43CLb025960; Wed, 26 Sep 2007 06:03:12 +0200 (MEST) Original-Received: by messiaen.laas.fr (sSMTP sendmail emulation); Wed, 26 Sep 2007 06:03:15 +0200 X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 5 =?iso-8859-1?Q?Vend=E9miaire?= an 216 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: "Julian Graham" , guile-devel@gnu.org In-Reply-To: <2bc5f8210709240839k3069f572ne54d10f44680671@mail.gmail.com> (Julian Graham's message of "Mon\, 24 Sep 2007 11\:39\:10 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Spam-Score: -0.001 () NO_RELAYS X-Scanned-By: MIMEDefang at CNRS-LAAS on IPv6:2001:660:6602::2 X-Detected-Kernel: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6814 Archived-At: Hi, "Julian Graham" writes: > Fair enough, re: closures. But why should callers outside the current > thread be able to access that thread's cleanup handler procedure? > Maybe this isn't a realistic issue, but you could use this to "inject" > arbitrary code into a separate thread by setting the cleanup procedure > and immediately canceling the thread. Why not treat the handler as > thread-specific data? Anyway, as long as you have a reference to an object (including a thread object), you can use the relevant procedures to mutate it. For instance, if my code passes a list to yours, I have no guarantee that your code won't call `set-car!' on it. Just to say that hiding the data doesn't solve this authorization problem, it just makes it less visible. Beside, it may be useful in some cases to assign a thread finalizer from outside the thread itself. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel