From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Julian Graham" Newsgroups: gmane.lisp.guile.devel Subject: Re: thread cancellation, take 2 Date: Wed, 26 Sep 2007 22:39:51 -0400 Message-ID: <2bc5f8210709261939g35dbdbc3g7823dcf3ca843083@mail.gmail.com> 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> <87ejgmnke4.fsf@laas.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_12342_23523338.1190860796179" X-Trace: sea.gmane.org 1190860816 18998 80.91.229.12 (27 Sep 2007 02:40:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Sep 2007 02:40:16 +0000 (UTC) Cc: guile-devel@gnu.org To: "=?ISO-8859-1?Q?Ludovic_Court=E8s?=" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Sep 27 04:40:11 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 1IajIQ-00045O-90 for guile-devel@m.gmane.org; Thu, 27 Sep 2007 04:40:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IajIN-0006Ai-50 for guile-devel@m.gmane.org; Wed, 26 Sep 2007 22:40:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IajIK-0006AR-AN for guile-devel@gnu.org; Wed, 26 Sep 2007 22:40:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IajIE-00066D-Qw for guile-devel@gnu.org; Wed, 26 Sep 2007 22:40:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IajIE-000662-LC for guile-devel@gnu.org; Wed, 26 Sep 2007 22:39:58 -0400 Original-Received: from fk-out-0910.google.com ([209.85.128.190]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IajID-0000cw-TP for guile-devel@gnu.org; Wed, 26 Sep 2007 22:39:58 -0400 Original-Received: by fk-out-0910.google.com with SMTP id 19so2713459fkr for ; Wed, 26 Sep 2007 19:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=YEblzfJWmCNtbLBqlQWQ6Zh5AFW+SJDwucpfNMfDG+U=; b=sSv5aaR+vML/PaEzDOVnWTjRE/U2xGJgx9c8LhRDDbzn8mRtB/6aDKLBZxbV4OFRRVDlhDJIi+a3vpfkzLaia9BX0bc8QGIjvZmPDVYItRMVRk4whPle24tFklSqobrxXucByW/NUTcBxMYwI+RN6MPqtIrYaJHtJez0NxfYpyY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=sI5qDTpHlAMYl+1gndZfHBzHZKaC+kIA8mGhEBCYjs+nZqG0VxnbV/okU+Zoxlc49FPBmxHcenSoP4PtXvxrgg8hnA1jMHbiM7N1OzidAL45ivvS/6FWQUNdWSTKL8V9JFUnLbVIrUXIto95W21UC6VMnJ2dVkKFTnn+cOKxPDw= Original-Received: by 10.82.178.11 with SMTP id a11mr3372634buf.1190860796185; Wed, 26 Sep 2007 19:39:56 -0700 (PDT) Original-Received: by 10.82.150.3 with HTTP; Wed, 26 Sep 2007 19:39:51 -0700 (PDT) In-Reply-To: <87ejgmnke4.fsf@laas.fr> X-Detected-Kernel: Linux 2.6 (newer, 2) 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:6815 Archived-At: ------=_Part_12342_23523338.1190860796179 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 9/26/07, Ludovic Court=E8s wrote: > 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. Okay. Here's the latest revision of the patch: * Changed the API as Ludovic suggests above -- push-thread-cleanup and pop-thread-cleanup are now, respectively, set-thread-cleanup! and thread-cleanup, and you can set and get to / from whatever thread you want. * Updated threads.test. * Modified the behavior of cancel-thread to allow for canceling the current thread. This necessitated some changes to scmsigs, so that the signal delivery thread could be notified to shut down -- not cleanly closing the signal pipe was leaving the process in a zombie state -- specifically, the addition of an extra mutex and a function in scmsigs.c. Let me know if this is too sloppy; rationale is provided in the comments. * Also (I realize this is a bit unrelated) changed the behavior of all-threads so that it doesn't include the signal delivery thread, because nobody has any business messing with it. Exposed a pointer to the delivery thread from of scmsigs.o. I hope this isn't too sloppy, either. Regards, Julian ------=_Part_12342_23523338.1190860796179 Content-Type: text/x-patch; name="thread-cancellation.HEAD.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="thread-cancellation.HEAD.patch"; filename="thread-cancellation.HEAD.patch" X-Attachment-Id: f_f72nocvs SW5kZXg6IGxpYmd1aWxlL251bGwtdGhyZWFkcy5oCj09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9zb3Vy Y2VzL2d1aWxlL2d1aWxlL2d1aWxlLWNvcmUvbGliZ3VpbGUvbnVsbC10aHJlYWRzLmgsdgpyZXRy aWV2aW5nIHJldmlzaW9uIDEuMTIKZGlmZiAtYSAtdSAtcjEuMTIgbnVsbC10aHJlYWRzLmgKLS0t IGxpYmd1aWxlL251bGwtdGhyZWFkcy5oCTE3IEFwciAyMDA2IDAwOjA1OjQwIC0wMDAwCTEuMTIK KysrIGxpYmd1aWxlL251bGwtdGhyZWFkcy5oCTI3IFNlcCAyMDA3IDAyOjIwOjMyIC0wMDAwCkBA IC00MSw2ICs0MSw5IEBACiAjZGVmaW5lIHNjbV9pX3B0aHJlYWRfY3JlYXRlKHQsYSxmLGQpICAg ICAgICgqKHQpPTAsICh2b2lkKShmKSwgRU5PU1lTKQogI2RlZmluZSBzY21faV9wdGhyZWFkX2Rl dGFjaCh0KSAgICAgICAgICAgICBkbyB7IH0gd2hpbGUgKDApCiAjZGVmaW5lIHNjbV9pX3B0aHJl YWRfZXhpdCh2KSAgICAgICAgICAgICAgIGV4aXQoMCkKKyNkZWZpbmUgc2NtX2lfcHRocmVhZF9j YW5jZWwodCkgICAgICAgICAgICAgMAorI2RlZmluZSBzY21faV9wdGhyZWFkX2NsZWFudXBfcHVz aCh0LHYpICAgICAwCisjZGVmaW5lIHNjbV9pX3B0aHJlYWRfY2xlYW51cF9wb3AoZSkgICAgICAg IDAKICNkZWZpbmUgc2NtX2lfc2NoZWRfeWllbGQoKSAgICAgICAgICAgICAgICAgMAogCiAvKiBT aWduYWxzCkluZGV4OiBsaWJndWlsZS9wdGhyZWFkLXRocmVhZHMuaAo9PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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ZpeCAiY2FuY2VsLXRocmVhZCIKKwkKKyAgICAgICAgKHBhc3MtaWYgImNhbmNl bCBzdWNjZWVkcyIKKwkgIChsZXQgKChtIChtYWtlLW11dGV4KSkpCisJICAgIChsb2NrLW11dGV4 IG0pCisJICAgIChsZXQgKCh0IChiZWdpbi10aHJlYWQgKGJlZ2luIChsb2NrLW11dGV4IG0pICdm b28pKSkpCisJICAgICAgKGNhbmNlbC10aHJlYWQgdCkKKwkgICAgICAoam9pbi10aHJlYWQgdCkK KwkgICAgICAjdCkpKQorCisJKHBhc3MtaWYgImhhbmRsZXIgcmVzdWx0IHBhc3NlZCB0byBqb2lu IgorCSAgKGxldCAoKG0gKG1ha2UtbXV0ZXgpKSkKKwkgICAgKGxvY2stbXV0ZXggbSkKKwkgICAg KGxldCAoKHQgKGJlZ2luLXRocmVhZCAobG9jay1tdXRleCBtKSkpKQorCSAgICAgIChzZXQtdGhy ZWFkLWNsZWFudXAhIHQgKGxhbWJkYSAoKSAnZm9vKSkKKwkgICAgICAoY2FuY2VsLXRocmVhZCB0 KQorCSAgICAgIChlcT8gKGpvaW4tdGhyZWFkIHQpICdmb28pKSkpCisKKwkocGFzcy1pZiAiY2Fu IGNhbmNlbCBzZWxmIgorCSAgKGxldCAoKG0gKG1ha2UtbXV0ZXgpKSkKKwkgICAgKGxvY2stbXV0 ZXggbSkKKwkgICAgKGxldCAoKHQgKGJlZ2luLXRocmVhZCAoYmVnaW4gCisJCQkJICAgICAoc2V0 LXRocmVhZC1jbGVhbnVwISAoY3VycmVudC10aHJlYWQpCisJCQkJCQkJICAobGFtYmRhICgpICdm b28pKQorCQkJCSAgICAgKGNhbmNlbC10aHJlYWQgKGN1cnJlbnQtdGhyZWFkKSkKKwkJCQkgICAg IChsb2NrLW11dGV4IG0pKSkpKQorCSAgICAgIChlcT8gKGpvaW4tdGhyZWFkIHQpICdmb28pKSkp CisKKwkocGFzcy1pZiAiaGFuZGxlciBzdXBwbGFudHMgZmluYWwgZXhwciIKKwkgIChsZXQgKCh0 IChiZWdpbi10aHJlYWQgKGJlZ2luIChzZXQtdGhyZWFkLWNsZWFudXAhIChjdXJyZW50LXRocmVh ZCkKKwkJCQkJCQkgICAgIChsYW1iZGEgKCkgJ2JhcikpCisJCQkJCSdmb28pKSkpCisJICAgIChl cT8gKGpvaW4tdGhyZWFkIHQpICdiYXIpKSkKKworCShwYXNzLWlmICJyZW1vdmUgaGFuZGxlciBi eSBzZXR0aW5nIGZhbHNlIgorCSAgKGxldCAoKG0gKG1ha2UtbXV0ZXgpKSkKKwkgICAgKGxvY2st bXV0ZXggbSkKKwkgICAgKGxldCAoKHQgKGJlZ2luLXRocmVhZCAobG9jay1tdXRleCBtKSAnYmFy KSkpCisJICAgICAgKHNldC10aHJlYWQtY2xlYW51cCEgdCAobGFtYmRhICgpICdmb28pKQorCSAg ICAgIChzZXQtdGhyZWFkLWNsZWFudXAhIHQgI2YpCisJICAgICAgKHVubG9jay1tdXRleCBtKQor CSAgICAgIChlcT8gKGpvaW4tdGhyZWFkIHQpICdiYXIpKSkpCisJCisJKHBhc3MtaWYgImluaXRp YWwgaGFuZGxlciBpcyBmYWxzZSIKKwkgIChub3QgKHRocmVhZC1jbGVhbnVwIChjdXJyZW50LXRo cmVhZCkpKSkpKSkK ------=_Part_12342_23523338.1190860796179 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel ------=_Part_12342_23523338.1190860796179--