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: libguile thread safety Date: Sat, 4 Jan 2014 00:22:52 +0000 Message-ID: <20140104002252.465aef65@bother.homenet> References: <20140103233407.36382e5f@bother.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 1388794987 25441 80.91.229.3 (4 Jan 2014 00:23:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jan 2014 00:23:07 +0000 (UTC) Cc: "guile-user@gnu.org" To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jan 04 01:23:12 2014 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 1VzF1E-0003wT-Dj for guile-user@m.gmane.org; Sat, 04 Jan 2014 01:23:12 +0100 Original-Received: from localhost ([::1]:52673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzF1D-0005FH-TB for guile-user@m.gmane.org; Fri, 03 Jan 2014 19:23:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzF0z-0005F4-LN for guile-user@gnu.org; Fri, 03 Jan 2014 19:23:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VzF0s-0003Ei-Az for guile-user@gnu.org; Fri, 03 Jan 2014 19:22:57 -0500 Original-Received: from smtpout1.wanadoo.co.uk ([80.12.242.29]:45690 helo=smtpout.wanadoo.co.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzF0s-0003EB-4I for guile-user@gnu.org; Fri, 03 Jan 2014 19:22:50 -0500 Original-Received: from bother.homenet ([95.146.112.60]) by mwinf5d07 with ME id 9cNo1n0071JEVaP03cNo8v; Sat, 04 Jan 2014 01:22:48 +0100 Original-Received: from bother.homenet (localhost [127.0.0.1]) by bother.homenet (Postfix) with ESMTP id 6FB1688504; Sat, 4 Jan 2014 00:22:52 +0000 (GMT) In-Reply-To: X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.22; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.12.242.29 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:10965 Archived-At: On Sat, 4 Jan 2014 01:08:12 +0100 Panicz Maciej Godek wrote: > Hi, > I have never used the pthread library directly, but would it be > possible for your program to use scm_spawn_thread instead? (according > to the manual, it starts a new thread in guile mode, but I guess it > needs to be run in guile mode as well) That wouldn't help in my usage case I am afraid. Essentially I am trying to integrate some scheme code with some C++ code, which involves running callable objects (tasks) on a thread pool. Some will be native C++ lambdas or other function objects, and some will be scheme code I was intending to run on the guile VM. That seemed a natural fit for libguile, but I was getting intermittent crashes when two tasks involving scheme code on the VM tried to start at approximately the same time. I was hoping there was something obvious in the test case that I was doing wrong. On the other hand, if it is a guile bug then I will have to see if I can work around it. If I can't, I may have to abandon this aspect of the project and go C++ only. If I have to serialize all running of scheme code on libguile it would slow other stuff down too much. I am still hopeful someone will tell me I have got something wrong in the test case. Chris