[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libguile thread safety
From: |
Chris Vine |
Subject: |
Re: libguile thread safety |
Date: |
Sat, 4 Jan 2014 00:22:52 +0000 |
On Sat, 4 Jan 2014 01:08:12 +0100
Panicz Maciej Godek <address@hidden> 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
Re: libguile thread safety, Mark H Weaver, 2014/01/03