Signals and slots use the event loop, so I would't consider them synchronous.
You can easily achieve async behavior.
Like in this case, do a network request and then notify me when its done,
QNetworkReply *reply = manager->get(QUrl("http://foo.com"));
connect(reply, SIGNAL(finished()), this, SLOT(some_slot()) );
Same with future, promise, you can achieve both async and sync behavior, its
really up to caller to decide. I often use future/promise just to limit a
particular operation on a server to only a couple threads. The end result is
people call a completely synchronous function.
It seems like this pattern is just a poor mans version of something that
already exists. I guess my confusion comes from all the time/energy your
putting into documenting it.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/11ec4909-340d-47c7-8bc5-6c055dd84b42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.