On Mon 05 Jul 2010 09:23, ri...@happyleptic.org writes:

> Suppose I have a multithreaded C program. Isn't the guile environment supposed
> to be shared amongst all threads ? That's what I understood from reading the
> docs anyway.
>
> Yet this simple exemple shows the opposite (see the 3 attached files).
> So am I supposed to source my global scheme definitions in all threads
> ?

Interestingly, the first thread has you in (guile-user), but the second
has you in (guile). So you don't see the full definition of format, nor
do you see hug.

A workaround is to do:

        scm_with_guile(hug_me, "(begin (set-current-module (resolve-module 
'(guile-user))) (hug 2))");

instead of

        scm_with_guile(hug_me, "(hug 2)");

But it's quite ugly. Does anyone have any input as to what module should
be current when a thread previously unknown to Guile enters Guile?

Andy
-- 
http://wingolog.org/

Reply via email to