[Development] Evolving Qt's multithreading API
Thiago Macieira
thiago.macieira at intel.com
Mon Mar 4 21:21:26 CET 2013
On segunda-feira, 4 de março de 2013 17.25.35, André Somers wrote:
> QFuture<T> runFunction(QFunction<T> then, QFunction<T> main);
> QFuture<T> runFunction(QFuntion<void> then, QFuntion<T> main);
> QFuture<T> runFunction(QFunction<T> main);
I think this is going too far. If you want to chain jobs, we need a more
complex job tracker. That's what ThreadWeaver is trying to do. But we need to
solve a simpler problem first.
And besides, you can always do:
QFutureWatcher<T> w = runFunction(...);
w.connect(&QFutureWatcher<T>::finished, []() { other function goes here });
w.connect(&QFutureWatcher<T>::finished, w, &QObject::deleteLater);
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130304/831b4ffe/attachment.sig>
More information about the Development
mailing list