[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: |
David Edmondson |
Subject: |
Re: [PATCH v1] Fix errors generated when multiple IRC clients talk to a single IRC proxy. |
Date: |
Wed, 15 Oct 2014 08:58:50 +0100 |
User-agent: |
Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-apple-darwin13.3.0) |
On Wed, Oct 15 2014, Thien-Thi Nguyen wrote:
> () David Edmondson <address@hidden>
> () Wed, 8 Oct 2014 15:03:17 +0100
>
> + (when erc-channel-new-member-names
> + (maphash (lambda (nick user)
> + (if (null (gethash nick erc-channel-new-member-names))
> + (erc-remove-channel-user nick)))
> + erc-channel-users)
> + (setq erc-channel-new-member-names nil)))
>
> 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’).
>
> Better to restructure as two passes: accumulation + destruction.
> That way, we cleanly avoid a bug, whether manifest or latent.
I understand your concern, however this is not that bug.