[Qt-interest] How to use QFuture for my own thread implementation?

Thiago Macieira thiago at kde.org
Sun Mar 21 13:49:33 CET 2010


Em Domingo 21. Março 2010, às 13.29.25, feudenfer escreveu:
> QFuture perfectly fits for asynchronous execution, I'd like to use it for
> my own implementations of this case. I.e. not only for QtConcurrent::run,
> but for any case using this pattern, for my own classes that are derived
> from QThread.
> 
> I haven't found any way to do so with QFuture... Anybody has a suggestion ?
> 
> It would be very useful to have some internal interface between QFuture and
> a thread. Unfortunately right now I have to implement my own classes that
> look like QFuture and work with my own multi-thread algorithms.

You need to use the undocumented internal classes of QtConcurrent to do that.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100321/c679921d/attachment.bin 


More information about the Qt-interest-old mailing list