Re: Do D's std.signals check for already-connected slot and simply ignore the call?

2018-10-17 Thread Enjoys Math via Digitalmars-d-learn
Answer: they don't connect uniquely, you have to manage that yourself.

Do D's std.signals check for already-connected slot and simply ignore the call?

2018-10-16 Thread Enjoys Math via Digitalmars-d-learn
If they don't, I have to wrap it like so: import std.signals; class Signal(T) { protected: mixin Signal!(T); }; class Changed(T) : Signal!T { protected: void delegate(T)[] slots; public: override void connect(void delegate(T) slot) { foreach (s; slots) { if (s == slot)