From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.user Subject: Re: Guile, pthreads and garbage collection Date: 14 May 2002 00:42:28 +0100 Sender: guile-user-admin@gnu.org Message-ID: References: <871ycgavq9.fsf@shadizar.dyndns.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021355603 2763 127.0.0.1 (14 May 2002 05:53:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 14 May 2002 05:53:23 +0000 (UTC) Cc: guile-user@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 177VFT-0000iS-00 for ; Tue, 14 May 2002 07:53:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 177VEn-0005Be-00; Tue, 14 May 2002 01:52:41 -0400 Original-Received: from mail.uklinux.net ([80.84.72.21] helo=s1.uklinux.net) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 177PXQ-0008VD-00 for ; Mon, 13 May 2002 19:47:33 -0400 Original-Received: from portalet.ossau.uklinux.net (dial-212-159-132-78.access.uk.tiscali.com [212.159.132.78]) by s1.uklinux.net (8.11.6/8.11.6) with ESMTP id g4DNlQY25709; Tue, 14 May 2002 00:47:26 +0100 Original-Received: from laruns.ossau.uklinux.net.ossau.uklinux.net (laruns.ossau.uklinux.net [192.168.1.3]) by portalet.ossau.uklinux.net (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id 2994416C3; Tue, 14 May 2002 00:46:25 +0000 (GMT) Original-To: "Michael J. Barillier" Original-Lines: 26 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:410 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:410 >>>>> "Michael" == Michael J Barillier writes: Michael> I'm designing an app with a background thread that access Michael> Guile SMOBs. If I'm running code in a pthread, can I Michael> trust Guile not to garbage collect a value while I'm Michael> accessing the content of the data structure under the Michael> SMOB? [...] Michael> Or, am I worrying needlessly about something that will Michael> never happen? For now, maybe: Guile in >1 preemptible thread doesn't currently work. For the future, no, it isn't needless. In other words, I'd say you're right to be worrying about this. The initial answer to your question is another question: why do you want to be playing with the underlying C structure at a time where there are no more SCM references? If the answer is that the C structure is also used by older non-Guile code, there's a description of a solution to this problem in the latest CVS manual. See the node `Extending Dia', and especially its subnode `Dia Smobs'. Does this help at all? (Note that it's not really Dia-specific at all.) Neil _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user