unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-user@gnu.org
Subject: Re: Thread and guile environment
Date: Fri, 09 Jul 2010 21:23:59 +0100	[thread overview]
Message-ID: <87630oe74w.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <m3aaq1rbzi.fsf@unquote.localdomain> (Andy Wingo's message of "Thu, 08 Jul 2010 20:48:33 +0100")

Andy Wingo <wingo@pobox.com> writes:

> On Mon 05 Jul 2010 09:23, rixed@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.

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



  parent reply	other threads:[~2010-07-09 20:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05  8:23 Thread and guile environment rixed
2010-07-05 19:52 ` Neil Jerram
2010-07-06 11:22   ` Cedric Cellier
2010-07-07 11:02     ` Cedric Cellier
2010-07-08 19:48 ` Andy Wingo
2010-07-09 15:54   ` Cedric Cellier
2010-07-09 19:10     ` Andy Wingo
2010-07-09 20:23   ` Neil Jerram [this message]
2010-07-10  8:22     ` Andy Wingo
2010-07-12 20:24       ` Linas Vepstas
2010-07-17 12:24         ` Andy Wingo
2010-07-12  8:09 ` Cedric Cellier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87630oe74w.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-user@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).