unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <INVALID.NOREPLY@gnu.org>
To: "Andy Wingo" <wingo@pobox.com>, "Ludovic Courtès" <ludo@gnu.org>,
	"Linas Vepstas" <linasvepstas@gmail.com>,
	bug-guile@gnu.org
Subject: [bug #24867] `define' should be thread-safe
Date: Tue, 23 Dec 2008 15:21:24 +0000	[thread overview]
Message-ID: <20081223-152123.sv15145.27370@savannah.gnu.org> (raw)
In-Reply-To: <20081223-030642.sv71519.76086@savannah.gnu.org>


Follow-up Comment #4, bug #24867 (project guile):

Thanks for the patch and test case!

A few remarks:

  1. `scm_sym2var ()' must be changed to acquire the mutex before performing
actual lookup.  Thus, `scm_define ()' itself doesn't need to acquire it.  I
think this should be enough to fix the bug.  It shouldn't slow things down too
much, thanks to memoization.

  2. The mutex can be declared as `static'.

  3. In 1.9, we should perhaps avoid `scm_i_define_mutex' and use a
per-module mutex (which isn't possible in 1.8 since it would break ABI). 
OTOH, is it really necessary to have such a fine grain?

Can you provide an updated patch with ChangeLog-style entry?

Ludo'.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?24867>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





  reply	other threads:[~2008-12-23 15:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-18 10:18 [bug #24867] `define' should be thread-safe Ludovic Courtès
2008-11-18 13:27 ` Ludovic Courtès
2008-12-23  2:36   ` Linas Vepstas
2008-12-23  2:50     ` Linas Vepstas
2008-12-23  3:06       ` Linas Vepstas
2008-12-23 15:21         ` Ludovic Courtès [this message]
2008-12-23 18:28           ` Linas Vepstas
2008-12-23 19:10             ` Linas Vepstas
2010-09-20  9:28               ` Kourtney Keese
2011-08-06  9:08                 ` JackBenny
2011-08-06  9:08                   ` JackBenny
2011-08-06  9:09                     ` JackBenny
2011-08-06  9:09                       ` JackBenny

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=20081223-152123.sv15145.27370@savannah.gnu.org \
    --to=invalid.noreply@gnu.org \
    --cc=bug-guile@gnu.org \
    --cc=linasvepstas@gmail.com \
    --cc=ludo@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).