guile-user
[Top][All Lists]
Advanced

[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 17:16:55 +0000

On Sat, 4 Jan 2014 16:01:35 +0100
Panicz Maciej Godek <address@hidden> wrote:
[snip]
> It indeed does seem that the threads share their top-level bindings on
> guile's side, and I suppose that this is the intended behaviour. I
> think that it can be easily adjusted with scm_eval_string_in_module,
> i.e. if you provide a separate module for each thread.

Ye gods.

Your suggestion seems the way to go.  However, having a separate module
for each thread is not really a runner with a thread pool.  Instead of
doing this on a thread-by-thread basis, it would instead be necessary to
create a new module on the fly for each task.  Most variables could of
course be wrapped in an overarching lambda or let expression
encapsulating the task, but there will still be some top level variables
to be exported to the task that the code will need to see.

Is there any procedure to obtain a unique random name in guile?

Chris



reply via email to

[Prev in Thread] Current Thread [Next in Thread]