all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Thien-Thi Nguyen <ttn@gnu.org>
Cc: emacs-devel@gnu.org, David Edmondson <dme@dme.org>
Subject: Re: [PATCH v1] Fix errors generated when multiple IRC clients talk to a single IRC proxy.
Date: Wed, 15 Oct 2014 09:54:49 -0400	[thread overview]
Message-ID: <jwv38ap30si.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87wq81om34.fsf@zigzag.favinet> (Thien-Thi Nguyen's message of "Wed, 15 Oct 2014 08:58:55 +0200")

> I don't know if this is the case for Emacs Lisp, but i've been
> burned when (and am thus now leery of) doing a destructive
> operation on the hash table while hash walking, elsewhere
> (here, ‘erc-remove-channel-user’ boils down to ‘remhash’).

It's indeed a dangerous area.  We intend to guarantee the following properties:
- if an element is in the table during the whole duration of maphash,
  then maphash will see it.
- if an element is not in the table during any part of the duration of maphash,
  then maphash will not see it.

So if an element is removed, maphash may still see it.  And if it gets
added, maphash may miss it.  And if it gets changed, maphash may see the
old value.


        Stefan



  parent reply	other threads:[~2014-10-15 13:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 14:03 [PATCH v1] Fix errors generated when multiple IRC clients talk to a single IRC proxy David Edmondson
2014-10-15  6:58 ` Thien-Thi Nguyen
2014-10-15  7:06   ` Thien-Thi Nguyen
2014-10-15  7:58   ` David Edmondson
2014-10-15 13:54   ` Stefan Monnier [this message]
2014-10-15 15:50 ` Mirek Kaim

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv38ap30si.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dme@dme.org \
    --cc=emacs-devel@gnu.org \
    --cc=ttn@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.