[Issue 10821] .byKey erroneously returns a null key

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 17 11:55:33 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10821



--- Comment #6 from hsteoh at quickfur.ath.cx 2013-08-17 11:55:32 PDT ---
(In reply to comment #5)
[...] 
> Of course this still isn't perfect, there's no telling what a signal handler
> really wants to do, whether it actually wants to add/remove some other handler
> immediately or only schedule add/removal for later.

I think the only safe way is to always process adds/deletes immediately after
iterating over the current handlers. Adds/removes for later can use a timer
mechanism. Modifying a container while iterating over it is never a good idea.
:)


> I guess the bottom line is this stuff is more complicated than I thought. I
> wonder if that new signals implementation recently announced handles this sort
> of stuff.

Well, it should be audited for this, then. :) It should be fixed if it doesn't
already handle this.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list