[Interest] QFutureWatcher and qRegisterMetaType
Lorenz Haas
lykurg at gmail.com
Fri Jul 10 16:26:29 CEST 2015
>
> I am not sure how your initial project looks, but for the code you sent, I
> would suggest a different approach:
>
Yes, I know about this approach, but unfortunately I can not use it - at
least I see no chance in my setting.
To elaborate a little: In reality Worker has a database connection which is
kept alive/open all the time and I have to use it in doHeavyStuff() - as an
additional constrained I need to use the connection from the same thread I
created it. Since QtConcurrent::run uses random threads I would have to
connect to the database for every single function call, pass connection
details etc. This was the reason I started to experiment with
QFutureInterface :)
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150710/3196a415/attachment.html>
More information about the Interest
mailing list