emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] Fix errors generated when multiple IRC clients talk to a


From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]