digitalmars.D.dwt - Sigal & Slot Implementation In D
- Sam Hu (1/1) Sep 17 2008 I noticed and read the module Signal.d inside the package tango.core and...
- Frank Benoit (4/5) Sep 17 2008 DWT does not use tango.core.Signal
- Sam Hu (4/4) Sep 17 2008 Hi Frank,
- Frank Benoit (3/4) Sep 18 2008 The concept of s&s is mainly, that they disconnect automatically and doe...
I noticed and read the module Signal.d inside the package tango.core and was wondering whether this mechanism has been implemented in dwt or somewhere else.
Sep 17 2008
Sam Hu Wrote:I noticed and read the module Signal.d inside the package tango.core and was wondering whether this mechanism has been implemented in dwt or somewhere else.DWT does not use tango.core.Signal In DWT the SWT like typed and untyped listeners are used. For convinience template functions exist to make the use of "curried"-delegates in a typesafe way available. See dgRunnable, dgListener.
Sep 17 2008
Hi Frank, Well noted DWT uses typed and untyped listener.Just wanna know more about the performance.AFAIK,the performance of signal & slot is far slower than call back functions,how about listeners?Is it slower than signal & slots or in the middle of call back functions and S&S? Thanks, Sam
Sep 17 2008
Sam Hu Wrote:Well noted DWT uses typed and untyped listener.Just wanna know more about the performance.AFAIK,the performance of signal & slot is far slower than call back functions,how about listeners?Is it slower than signal & slots or in the middle of call back functions and S&S?The concept of s&s is mainly, that they disconnect automatically and does not prevent an object from GC collection. It is not about performance IMO. The Listeners in DWT do use a virtual function call. So the call performance is not much of relevance, i think. But the creation of a Listener itself is always using a Heap allocated object. That might be of relevance.
Sep 18 2008