unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: guile-devel@gnu.org
Subject: Re: [PATCH] Universally-unique gensyms
Date: Thu, 19 Jan 2012 02:21:48 +0100	[thread overview]
Message-ID: <87hazspjv7.fsf@fencepost.gnu.org> (raw)
In-Reply-To: 87d3agy4g1.fsf@netris.org

Mark H Weaver <mhw@netris.org> writes:

> Andy Wingo <wingo@pobox.com> writes:
>
>> Sorry for asking a stupid question, but why is it that we want the
>> gensym counter to be thread-local?  Just to avoid the mutex?  TBH I
>> don't think it's that big of a point of contention.  This risks
>> devolution into bike-shed-landia tho...
>
> It's a reasonable question.  I don't feel strongly about it, but I
> prefer lock-free programming where practical, and in this case there's
> really no need for coordination between threads.  Indeed, these UUIDs
> are already designed to avoid collisions between multiple _sessions_
> without coordination.  So why bother with the lock?

To avoid both threads reading the same seed value before generating the
same number?  I have not looked at the code, but that could be a reason
for serializing.

-- 
David Kastrup




  reply	other threads:[~2012-01-19  1:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 13:27 [PATCH] Universally-unique gensyms Mark H Weaver
2012-01-17 13:57 ` Andy Wingo
2012-01-17 14:06   ` Andy Wingo
2012-01-18  8:04   ` Mark H Weaver
2012-01-18  9:35     ` Mark H Weaver
2012-01-18 21:41     ` Ludovic Courtès
2012-01-18 22:23       ` Andy Wingo
2012-01-18 22:43         ` Ludovic Courtès
2012-01-18 23:30         ` Mark H Weaver
2012-01-19  1:21           ` David Kastrup [this message]
2012-01-19  4:50             ` Mark H Weaver
2012-01-19  6:25               ` David Kastrup
2012-01-19 10:23                 ` Mark H Weaver
2012-01-20  0:50                   ` Mark H Weaver
2012-01-19  0:58       ` Mark H Weaver
2012-01-19 23:26         ` Ludovic Courtès
2012-01-18 21:42     ` 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=87hazspjv7.fsf@fencepost.gnu.org \
    --to=dak@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).