unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Critical sections
Date: Thu, 13 Nov 2008 23:44:24 +0100	[thread overview]
Message-ID: <87prkzz1o7.fsf_-_@gnu.org> (raw)
In-Reply-To: m363mr9wwb.fsf@pobox.com

Hi,

Andy Wingo <wingo@pobox.com> writes:

> I think the idea behind the check sounds good -- it is incorrect to
> throw from within a critical section, and the check detects this.
>
> But the check is incorrect as you noticed, it should be checking if the
> current thread is in a critical section.
>
> So we have two options, to remove the check or to fix the critical
> section counter (possiblity to be thread-local). My instinct would be
> that removal is the correct solution in 1.8, and that in master the
> decision depends on whether we merge the BDW GC or not, and what the
> impact that GC has on the idea of critical sections.

Looking at uses of critical sections, it's not always clear what the
rationale is.

In some cases, e.g., `scm_sys_modify_instance ()' and
`scm_sys_modify_class ()', it's used to make an operation atomic.

In other cases, it seems to be used as a coarse-grain mutex (e.g.,
`scm_symbol_to_keyword ()', `scm_set_object_property_x ()').

So, at first sight, I'm not sure changing GCs would lead us to change
that.

Thanks,
Ludo'.





  reply	other threads:[~2008-11-13 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3ae3aa420811122028w3c069b88q93a8290385188f79@mail.gmail.com>
2008-11-13  4:56 ` Does anyone actually use threads with guile? Linas Vepstas
2008-11-13 20:46   ` Andy Wingo
2008-11-13 22:44     ` Ludovic Courtès [this message]
2008-11-13 22:56     ` Linas Vepstas
2008-11-17 13:09   ` Han-Wen Nienhuys

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=87prkzz1o7.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --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).