From: Andy Wingo <wingo@pobox.com>
To: rixed@happyleptic.org
Cc: guile-user@gnu.org
Subject: Re: Thread and guile environment
Date: Thu, 08 Jul 2010 20:48:33 +0100 [thread overview]
Message-ID: <m3aaq1rbzi.fsf@unquote.localdomain> (raw)
In-Reply-To: <20100705082310.GA9492@apc> (rixed@happyleptic.org's message of "Mon, 5 Jul 2010 10:23:11 +0200")
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.
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/
next prev parent reply other threads:[~2010-07-08 19:48 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 [this message]
2010-07-09 15:54 ` Cedric Cellier
2010-07-09 19:10 ` Andy Wingo
2010-07-09 20:23 ` Neil Jerram
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=m3aaq1rbzi.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-user@gnu.org \
--cc=rixed@happyleptic.org \
/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).