unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Han-Wen Nienhuys <hanwen@xs4all.nl>
To: guile-devel@gnu.org
Subject: Re: Using define in multiple threads?
Date: Mon, 17 Nov 2008 11:18:45 -0200	[thread overview]
Message-ID: <gfrqvq$os6$1@ger.gmane.org> (raw)
In-Reply-To: <3ae3aa420811161427t6b2c65d1q4adcd6e9a5689ddc@mail.gmail.com>

Linas Vepstas escreveu:
> Is it "safe" or "legal" to use define in multiple threads?

I guess not.  Someone -I forgot who- put in the pthreads without thinking 
through the consequences.

Look through eval.c, you´ll see

  SCM_SETCAR (expr, SCM_IM_DO);
  // *
  SCM_SETCDR (expr, tail);

which is very dubious if a thread switch happens at (*)

-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen





  reply	other threads:[~2008-11-17 13:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-16 22:27 Using define in multiple threads? Linas Vepstas
2008-11-17 13:18 ` Han-Wen Nienhuys [this message]
2008-11-17 14:57   ` Ludovic Courtès
2008-11-17 20:45     ` Andy Wingo
2008-11-18 10:20       ` Ludovic Courtès
2008-11-19 23:36         ` Neil Jerram
2008-11-19 23:45           ` Andy Wingo
2008-11-20  8:33             ` Ludovic Courtès

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='gfrqvq$os6$1@ger.gmane.org' \
    --to=hanwen@xs4all.nl \
    --cc=guile-devel@gnu.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).