[Interest] Are slots even needed these days?

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Wed Mar 16 17:57:36 CET 2016


Il 16/03/2016 17:24, charleyb123 . ha scritto:
> Current slot implementation bridges runtime-reflection capabilities
> (provided by QMetaObject), and provides the thread-safe event queue that
> bridges "slot-execution" to occur on the "target-thread" for which the
> "target-QObject" has "affinity".  Lambdas alone cannot do this -- some
> kid of "event-queue" would be required that is "thread-aware" (yes,
> could be provided through a library of some kind, that happens to be
> what Qt is doing).

This thread wasn't talking about lambdas, rather about the "old" connect 
syntax (SIGNAL/SLOT based) vs the "new" one (PMF based).

Anyhow, since you brought lambdas into discussion, you can pass an 
affinity object for them as well:

> https://doc.qt.io/qt-5/qobject.html#connect-5

Cheers,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4068 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160316/b7404386/attachment.bin>


More information about the Interest mailing list