Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 753454bfb193d7e8ae714a765a56bb39 > files > 59

qtbase5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtconcurrent-index.qdoc -->
  <title>Qt Concurrent 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td >Qt Concurrent</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.12.6 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#getting-started">Getting Started</a></li>
<li class="level1"><a href="#licenses">Licenses</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Qt Concurrent</h1>
<span class="subtitle"></span>
<!-- $$$qtconcurrent-index.html-description -->
<div class="descr"> <a name="details"></a>
<a name="getting-started"></a>
<h2 id="getting-started">Getting Started</h2>
<p>The <a href="qtconcurrent-module.html">QtConcurrent</a> namespace provides high-level APIs that make it possible to write multi-threaded programs without using low-level threading primitives such as mutexes, read-write locks, wait conditions, or semaphores. Programs written with <a href="qtconcurrent-module.html">QtConcurrent</a> automatically adjust the number of threads used according to the number of processor cores available. This means that applications written today will continue to scale when deployed on multi-core systems in the future.</p>
<p><a href="qtconcurrent-module.html">QtConcurrent</a> includes functional programming style APIs for parallel list processing, including a MapReduce and FilterReduce implementation for shared-memory (non-distributed) systems, and classes for managing asynchronous computations in GUI applications:</p>
<ul>
<li><a href="qtconcurrentmap.html">Concurrent Map and Map-Reduce</a><ul>
<li><a href="qtconcurrent.html#map">QtConcurrent::map()</a> applies a function to every item in a container, modifying the items in-place.</li>
<li><a href="qtconcurrent.html#mapped">QtConcurrent::mapped()</a> is like map(), except that it returns a new container with the modifications.</li>
<li><a href="qtconcurrent.html#mappedReduced">QtConcurrent::mappedReduced()</a> is like mapped(), except that the modified results are reduced or folded into a single result.</li>
</ul>
</li>
<li><a href="qtconcurrentfilter.html">Concurrent Filter and Filter-Reduce</a><ul>
<li><a href="qtconcurrent.html#filter">QtConcurrent::filter()</a> removes all items from a container based on the result of a filter function.</li>
<li><a href="qtconcurrent.html#filtered">QtConcurrent::filtered()</a> is like filter(), except that it returns a new container with the filtered results.</li>
<li><a href="qtconcurrent.html#filteredReduced">QtConcurrent::filteredReduced()</a> is like filtered(), except that the filtered results are reduced or folded into a single result.</li>
</ul>
</li>
<li><a href="qtconcurrentrun.html">Concurrent Run</a><ul>
<li><a href="qtconcurrent.html#run">QtConcurrent::run()</a> runs a function in another thread.</li>
</ul>
</li>
<li><a href="../qtcore/qfuture.html">QFuture</a> represents the result of an asynchronous computation.</li>
<li><a href="../qtcore/qfutureiterator.html">QFutureIterator</a> allows iterating through results available via <a href="../qtcore/qfuture.html">QFuture</a>.</li>
<li><a href="../qtcore/qfuturewatcher.html">QFutureWatcher</a> allows monitoring a <a href="../qtcore/qfuture.html">QFuture</a> using signals-and-slots.</li>
<li><a href="../qtcore/qfuturesynchronizer.html">QFutureSynchronizer</a> is a convenience class that automatically synchronizes several QFutures.</li>
</ul>
<p>Qt Concurrent supports several STL-compatible container and iterator types, but works best with Qt containers that have random-access iterators, such as <a href="../qtcore/qlist.html">QList</a> or <a href="../qtcore/qvector.html">QVector</a>. The map and filter functions accept both containers and begin/end iterators.</p>
<p>STL Iterator support overview:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Iterator Type</th><th >Example classes</th><th >Support status</th></tr></thead>
<tr valign="top" class="odd"><td >Input Iterator</td><td ></td><td >Not Supported</td></tr>
<tr valign="top" class="even"><td >Output Iterator</td><td ></td><td >Not Supported</td></tr>
<tr valign="top" class="odd"><td >Forward Iterator</td><td >std::slist</td><td >Supported</td></tr>
<tr valign="top" class="even"><td >Bidirectional Iterator</td><td ><a href="../qtcore/qlinkedlist.html">QLinkedList</a>, std::list</td><td >Supported</td></tr>
<tr valign="top" class="odd"><td >Random Access Iterator</td><td ><a href="../qtcore/qlist.html">QList</a>, <a href="../qtcore/qvector.html">QVector</a>, std::vector</td><td >Supported and Recommended</td></tr>
</table></div>
<p>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 <a href="../qtcore/qfuture.html#progressValue">QFuture::progressValue</a>() and <a href="../qtcore/qfuturewatcher.html#progressValueChanged">QFutureWatcher::progressValueChanged</a>().</p>
<p>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.</p>
<a name="licenses"></a>
<h2 id="licenses">Licenses</h2>
<p>The Qt Concurrent module is available under commercial licenses from The Qt Company. In addition, it is available under free software licenses. Since Qt 5.4, these free software licenses are GNU Lesser General Public License, version 3, or the GNU General Public License, version 2. See Qt Licensing for further details.</p>
</div>
<!-- @@@qtconcurrent-index.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>