From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Trouble joining with threads from C Date: Sat, 16 Apr 2011 17:55:50 +0200 Message-ID: References: <87y64rzd5p.fsf@netris.org> <8762rswzzf.fsf@netris.org> <87vczdqtdx.fsf@gnu.org> <87ipuhzvvk.fsf@gnu.org> <877haxzvh6.fsf@gnu.org> <87ipufdwa3.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1302969372 27774 80.91.229.12 (16 Apr 2011 15:56:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Apr 2011 15:56:12 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Apr 16 17:56:07 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QB7qw-0000KI-0f for guile-devel@m.gmane.org; Sat, 16 Apr 2011 17:56:06 +0200 Original-Received: from localhost ([::1]:46482 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB7qv-0007mr-6c for guile-devel@m.gmane.org; Sat, 16 Apr 2011 11:56:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB7qr-0007ml-1C for guile-devel@gnu.org; Sat, 16 Apr 2011 11:56:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QB7qp-0004mx-M1 for guile-devel@gnu.org; Sat, 16 Apr 2011 11:56:00 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:36196 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB7qp-0004mT-Jo; Sat, 16 Apr 2011 11:55:59 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 7C9A75203; Sat, 16 Apr 2011 11:57:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=SJ11HGyJYbZv HwHD0F8OkTopkpM=; b=PpzBCa2vTOFCc6nMkJyWa2frD/6qkBd/CnYfjLycNT0u NTf3Ykjf5UXu2PS/SiXIiZ5ClXoPCWWSnKv+SQsfCqMSFugciHBzWrKFcRg//KC8 s5jjilbrh4m2M9AgsaBzjOSMzcXsQQMx6fLzliVpmU2fgB47NqTfiRMgFdhi6zg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=vdfC86 ZEUnDW0XOdrw5lGXcX95Dk0J/TOlLcivSeBhwEg+Ly9ctxUFAoVuTxl+xhtV673m Wsw2hn2YbzPlbGOKgSGNohEqOv5ojutEwgHrc9xdM+IjXBXLtgRzmLfXAg9OwdCy JaaGsqnvEj9W8V3VCEjoMkrSbQx1V/CdZ6OZ8= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 682715201; Sat, 16 Apr 2011 11:57:55 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id C92EB5200; Sat, 16 Apr 2011 11:57:53 -0400 (EDT) In-Reply-To: <87ipufdwa3.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 15 Apr 2011 23:44:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 4AD1258C-6842-11E0-B3D8-E8AB60295C12-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12273 Archived-At: Heya Ludo, On Fri 15 Apr 2011 23:44, ludo@gnu.org (Ludovic Court=C3=A8s) writes: >> For example in the following program: >> >> void* thread (void*) >> { >> scm_with_guile (do_something, NULL); >> scm_with_guile (do_something_else, NULL); >> return NULL; >> } >> >> int main () >> { >> pthread_t thr; >> pthread_create (&thr, NULL, thread, NULL); >> pthread_join (thr, NULL); >> return 0; >> } >> >> When do you propose that the cleanup handlers for the thread be called? > > I=E2=80=99ll followup on this later, but currently it seems impossible to= call > GC_INIT from a thread other than the initial thread [0]. Interesting; I had it working at some point, in the context of that other bug; anyway, the same considerations hold if you scm_init_guile in the main thread first. Cheers, Andy --=20 http://wingolog.org/