15.06.2013 14:19, David пишет: >> http://dlang.org/phobos/std_signals.html#Signal >> "Mixin to create a signal within a class object." >> >> So your `X` must be a class. > Oh right I have totally overseen that, still used to work really well > with 2.063 It can work only by accident iff the struct isn't moved in memory no matter what compiler version you use. > >> Also don't use std.signals - it's an incorrect and dangerous mess (see >> bug tracker). > Provide me something better in phobos and so far it works pretty good > (except the update breaking struct-signals)
Currently there is no working signals implementation in Phobos. The worst thing about the current implementation is it will fail you program accidentally in rare cases. Don't use it. For issues, see: http://d.puremagic.com/issues/show_bug.cgi?id=4150 http://d.puremagic.com/issues/show_bug.cgi?id=9606 http://d.puremagic.com/issues/show_bug.cgi?id=9603 Also post to NG instead of emailing directly to allow others to follow the discussion. Also if you _do_ need working signals I can help a with implementation. -- Денис В. Шеломовский Denis V. Shelomovskij ------------------------------------------------------------------------------------- Regarding E-mailing, sorry about that, I hate the thunderbird answer button.... > It can work only by accident iff the struct isn't moved in memory no > matter what compiler version you use. This worked for at least 3 compiler versions now I am aware of all of these bugs, none are critical if you know them 4150: use only class methods as event handlers 9606: emitting signals from a different thread would segfault in my application anayways (opengl code) 9603: basically same as 4150 Also wasn't there a std.signals2 somewhere...