[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Thread and guile environment
From: |
Neil Jerram |
Subject: |
Re: Thread and guile environment |
Date: |
Fri, 09 Jul 2010 21:23:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Andy Wingo <address@hidden> writes:
> On Mon 05 Jul 2010 09:23, address@hidden 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.
That's what I thought too. But in that case I have no idea why my
'(define-module (guile-user))' suggestion didn't work.
> 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?
Surely it has to be (guile-user), since that what the end of boot-9.scm
moves into - and hence is well-established for the single thread case.
I suspect that a program that calls scm_with_guile() on multiple threads
can't necessarily predict which of the threads will perform the Guile
startup.
Neil