[Previous: Threads and QObjects] [Thread Support in Qt] [Next: Thread-Support in Qt Modules] Concurrent Programming
|
Iterator Type | Example classes | Support status |
---|---|---|
Input Iterator | Not Supported | |
Output Iterator | Not Supported | |
Forward Iterator | std::slist | Supported |
Bidirectional Iterator | QLinkedList, std::list | Supported |
Random Access Iterator | QList, QVector, std::vector | Supported and Recommended |
Random access iterators can be faster in cases where Qt Concurrent is iterating over a large number of lightweight items, since they allow skipping to any point in the container. In addition, using random access iterators allows Qt Concurrent to provide progress information trough QFuture::progressValue() and QFutureWatcher:: progressValueChanged().
The non in-place modifying functions such as mapped() and filtered() makes a copy of the container when called. If you are using STL containers this copy operation might take some time, in this case we recommend specifying the begin and end iterators for the container instead.
[Previous: Threads and QObjects] [Thread Support in Qt] [Next: Thread-Support in Qt Modules]
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.6.0 |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |