From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.user Subject: Re: Potluck - thread safe event loop with await semantics Date: Tue, 23 Feb 2016 01:30:34 +0000 Message-ID: <20160223013034.5b1badbb@dell.homenet> References: <20160216214512.42e6fd39@bother.homenet> <878u2dosxu.fsf@gnu.org> <20160222174056.2091d806@dell.homenet> <20160222172804.6d40b0c3@capac> <20160223003121.4ae217f1@dell.homenet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1456191062 13006 80.91.229.3 (23 Feb 2016 01:31:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Feb 2016 01:31:02 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Feb 23 02:30:56 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aY1oT-0002bP-MT for guile-user@m.gmane.org; Tue, 23 Feb 2016 02:30:53 +0100 Original-Received: from localhost ([::1]:53080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY1oS-0006Md-TZ for guile-user@m.gmane.org; Mon, 22 Feb 2016 20:30:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY1oG-0006Jn-0S for guile-user@gnu.org; Mon, 22 Feb 2016 20:30:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aY1oD-0000T4-AD for guile-user@gnu.org; Mon, 22 Feb 2016 20:30:39 -0500 Original-Received: from avasout08.plus.net ([212.159.14.20]:41599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY1oC-0000Sh-UZ for guile-user@gnu.org; Mon, 22 Feb 2016 20:30:37 -0500 Original-Received: from dell.homenet ([87.115.102.251]) by avasout08 with smtp id MdWa1s0055RSpqF01dWbTN; Tue, 23 Feb 2016 01:30:35 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=O6PEx0JW c=1 sm=1 tr=0 a=LKYHlaG36XqnqgCEqUWx/g==:117 a=LKYHlaG36XqnqgCEqUWx/g==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=jFJIQSaiL_oA:10 a=Fwo3Pw8wAAAA:8 a=gvzw1LMJ6Q3YmPlzSY4A:9 a=CjuIK1q_8ugA:10 Original-Received: from dell.homenet (localhost [127.0.0.1]) by dell.homenet (Postfix) with ESMTP id 7E5D2443A39 for ; Tue, 23 Feb 2016 01:30:34 +0000 (GMT) In-Reply-To: <20160223003121.4ae217f1@dell.homenet> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 212.159.14.20 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:12430 Archived-At: On Tue, 23 Feb 2016 00:31:21 +0000 Chris Vine wrote: > On Mon, 22 Feb 2016 1 > When I tested guile-gnome a few years ago I could reliably get > g-idle-add to crash when calling it from a worker thread. If that is > no longer the case I am pleased to hear it. However, the little test > program at the end[1], which prints to the screen every 1/10th of a > second, will also segfault for me if I run it in a terminal for > somewhere between 1 and 5 minutes. It seems to crash more readily if > it is in a terminal not on the current virtual desktop, but will in > the end crash even when it is. To complete the picture, since testing guile-gnome I have run the same program on my alternative event loop[1], and it has been running for 55 minutes without problems. So it does not seem to be a guile threading issue. There definitely seems to be something wrong with guile-gnome itself as regards thread safety. Chris [1] The equivalent program was: --------------------------- #!/usr/bin/env guile !# (use-modules (event-loop) (ice-9 threads)) (define main-loop (make-event-loop)) (call-with-new-thread (lambda () (let loop () (event-post! main-loop (lambda () (display "running ") #f)) (usleep 100000) (loop)))) (event-loop-block! main-loop #t) (display "Starting main loop\n") (event-loop-run! main-loop) ---------------------------