In questa pagina

QtConcurrent Namespace

Lo spazio dei nomi QtConcurrent fornisce API di alto livello che consentono di scrivere programmi multithread senza ricorrere a primitive di threading di basso livello. Per saperne di più...

Intestazione: #include <QtConcurrent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Concurrent)
target_link_libraries(mytarget PRIVATE Qt6::Concurrent)
qmake: QT += concurrent

Classi

(since 6.0) class QTaskBuilder

Tipi

enum class FutureResult { Ignore }
InvokeResultType
enum ReduceOption { UnorderedReduce, OrderedReduce, SequentialReduce }
flags ReduceOptions

Funzioni

void blockingFilter(Sequence &sequence, KeepFunctor &&filterFunction)
void blockingFilter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
std::decay_t<Sequence> blockingFiltered(Sequence &&sequence, KeepFunctor &&filterFunction)
OutputSequence blockingFiltered(Iterator begin, Iterator end, KeepFunctor &&filterFunction)
std::decay_t<Sequence> blockingFiltered(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction)
OutputSequence blockingFiltered(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction)
ResultType blockingFilteredReduced(Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingFilteredReduced(Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingFilteredReduced(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingFilteredReduced(Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingFilteredReduced(Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingFilteredReduced(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingFilteredReduced(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingFilteredReduced(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
void blockingMap(Sequence &&sequence, MapFunctor &&function)
void blockingMap(Iterator begin, Iterator end, MapFunctor &&function)
void blockingMap(QThreadPool *pool, Sequence &&sequence, MapFunctor function)
void blockingMap(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&function)
OutputSequence blockingMapped(InputSequence &&sequence, MapFunctor &&function)
Sequence blockingMapped(Iterator begin, Iterator end, MapFunctor &&function)
OutputSequence blockingMapped(QThreadPool *pool, InputSequence &&sequence, MapFunctor &&function)
Sequence blockingMapped(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&function)
ResultType blockingMappedReduced(Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingMappedReduced(Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingMappedReduced(QThreadPool *pool, Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingMappedReduced(Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingMappedReduced(Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingMappedReduced(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingMappedReduced(QThreadPool *pool, Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
ResultType blockingMappedReduced(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<void> filter(Sequence &sequence, KeepFunctor &&filterFunction)
QFuture<void> filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
QFuture<typename std::decay_t<Sequence>::value_type> filtered(Sequence &&sequence, KeepFunctor &&filterFunction)
QFuture<typename qValueType<Iterator>::value_type> filtered(Iterator begin, Iterator end, KeepFunctor &&filterFunction)
QFuture<typename std::decay_t<Sequence>::value_type> filtered(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction)
QFuture<typename qValueType<Iterator>::value_type> filtered(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction)
QFuture<ResultType> filteredReduced(Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> filteredReduced(Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> filteredReduced(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> filteredReduced(Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> filteredReduced(Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> filteredReduced(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> filteredReduced(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> filteredReduced(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<void> map(Sequence &&sequence, MapFunctor &&function)
QFuture<void> map(Iterator begin, Iterator end, MapFunctor &&function)
QFuture<void> map(QThreadPool *pool, Sequence &&sequence, MapFunctor &&function)
QFuture<void> map(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&function)
QFuture<QtPrivate::MapResultType<Sequence, MapFunctor>> mapped(Sequence &&sequence, MapFunctor &&function)
QFuture<QtPrivate::MapResultType<Iterator, MapFunctor>> mapped(Iterator begin, Iterator end, MapFunctor &&function)
QFuture<QtPrivate::MapResultType<Sequence, MapFunctor>> mapped(QThreadPool *pool, Sequence &&sequence, MapFunctor &&function)
QFuture<QtPrivate::MapResultType<Iterator, MapFunctor>> mapped(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&function)
QFuture<ResultType> mappedReduced(Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> mappedReduced(Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> mappedReduced(QThreadPool *pool, Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> mappedReduced(Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> mappedReduced(Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> mappedReduced(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> mappedReduced(QThreadPool *pool, Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<ResultType> mappedReduced(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))
QFuture<T> run(Function function, ...)
QFuture<T> run(QThreadPool *pool, Function function, ...)
(since 6.0) QtConcurrent::QTaskBuilder<Task> task(Task &&task)

Descrizione dettagliata

Consultare la Qt Concurrent documentazione del modulo per una panoramica delle funzioni disponibili, oppure consulta quanto riportato di seguito per informazioni dettagliate su ciascuna funzione.

Ottimizzazione delle inclusioni

Se si include l'intestazione <QtConcurrent>, verrà incluso l'intero modulo Qt Concurrent insieme all'intero modulo Qt Core, il che potrebbe aumentare i tempi di compilazione e le dimensioni dei file binari. Per utilizzare singole funzioni dello spazio dei nomi QtConcurrent, è possibile includere intestazioni più specifiche.

La tabella seguente elenca le funzioni presenti nello spazio dei nomi QtConcurrent e le relative intestazioni:

FunzioneHeader
QtConcurrent::run()<QtConcurrentRun>
QtConcurrent::task()<QtConcurrentTask>
QtConcurrent::filter(), QtConcurrent::filtered(), QtConcurrent::filteredReduced()<QtConcurrentFilter>
QtConcurrent::map(), QtConcurrent::mapped(), QtConcurrent::mappedReduced()<QtConcurrentMap>

Classi

classe QTaskBuilder

La classe QTaskBuilder viene utilizzata per regolare i parametri delle attività. Maggiori informazioni...

Documentazione sui tipi

enum class QtConcurrent::FutureResult

Questo tipo di enumerazione viene utilizzato per richiamare un sovraccarico speciale del metodo ` QtConcurrent::QTaskBuilder::spawn` (QtConcurrent::FutureResult) che non restituisce un oggetto `Future`.

CostanteValoreDescrizione
QtConcurrent::FutureResult::Ignore0Un tag ausiliario introdotto per migliorare la leggibilità del codice.

[alias] InvokeResultType

La definizione semplificata di questo tipo è la seguente:

template <class Task, class ...Args>
using InvokeResultType = std::invoke_result_t<std::decay_t<Task>, std::decay_t<Args>...>;

L'implementazione effettiva prevede anche un controllo in fase di compilazione per verificare se il task possa essere richiamato con gli argomenti specificati.

enum QtConcurrent::ReduceOption
flags QtConcurrent::ReduceOptions

Questa enumerazione specifica l'ordine in cui i risultati della funzione `map` o `filter` vengono passati alla funzione `reduce`.

CostanteValoreDescrizione
QtConcurrent::UnorderedReduce0x1La riduzione viene eseguita in un ordine arbitrario.
QtConcurrent::OrderedReduce0x2La riduzione viene eseguita nell'ordine della sequenza originale.
QtConcurrent::SequentialReduce0x4La riduzione viene eseguita in modo sequenziale: solo un thread alla volta entrerà nella funzione di riduzione. (La riduzione parallela potrebbe essere supportata in una versione futura di Qt Concurrent.)

Il tipo ReduceOptions è un typedef per QFlags<ReduceOption>. Memorizza una combinazione OR di valori ReduceOption.

Documentazione della funzione

template <typename Sequence, typename KeepFunctor> void QtConcurrent::blockingFilter(Sequence &sequence, KeepFunctor &&filterFunction)

Chiama ` filterFunction ` una volta per ogni elemento presente in ` sequence`. Se ` filterFunction ` restituisce ` true`, l'elemento viene mantenuto in ` sequence`; in caso contrario, l'elemento viene rimosso da ` sequence`.

Si noti che questo metodo non dispone di un sovraccarico che funzioni con gli iteratori, poiché invalida gli iteratori della sequenza su cui opera.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche `Concurrent Filter` e `Filter-Reduce`.

template <typename Sequence, typename KeepFunctor> void QtConcurrent::blockingFilter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)

Chiama ` filterFunction ` una volta per ogni elemento presente in ` sequence`. Tutte le chiamate a ` filterFunction ` vengono eseguite dai thread prelevati da ` QThreadPool ` pool. Se ` filterFunction ` restituisce ` true`, l'elemento viene mantenuto in ` sequence`; in caso contrario, l'elemento viene rimosso da ` sequence`.

Si noti che questo metodo non dispone di un sovraccarico che funzioni con gli iteratori, poiché invalida gli iteratori della sequenza su cui opera.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template <typename Sequence, typename KeepFunctor> std::decay_t<Sequence> QtConcurrent::blockingFiltered(Sequence &&sequence, KeepFunctor &&filterFunction)

Chiama una volta filterFunction per ogni elemento presente in sequence e restituisce una nuova Sequence contenente gli elementi conservati. Se filterFunction restituisce true, una copia dell’elemento viene inserita nella nuova Sequence. In caso contrario, l’elemento non apparirà nella nuova Sequence.

Nota: questa funzione rimane in attesa fino a quando tutti gli elementi della sequenza non sono stati elaborati.

Vedi anche ` filtered()` e ` Concurrent Filter` e `Filter-Reduce`.

template < typename OutputSequence, typename Iterator, typename KeepFunctor > OutputSequence QtConcurrent::blockingFiltered(Iterator begin, Iterator end, KeepFunctor &&filterFunction)

Chiama una volta la funzione ` filterFunction ` per ogni elemento compreso tra ` begin ` e ` end ` e restituisce una nuova sequenza contenente gli elementi conservati. Se ` filterFunction ` restituisce ` true`, una copia dell’elemento viene inserita nella nuova sequenza. In caso contrario, l’elemento non apparirà nella nuova sequenza.

Nota: questa funzione rimane in attesa finché l’iteratore non raggiunge la fine della sequenza in elaborazione.

Vedi anche ` filtered()` e ` Concurrent Filter` e `Filter-Reduce`.

template <typename Sequence, typename KeepFunctor> std::decay_t<Sequence> QtConcurrent::blockingFiltered(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction)

Chiama una volta filterFunction per ogni elemento presente in sequence e restituisce una nuova Sequence contenente gli elementi conservati. Tutte le chiamate a filterFunction vengono eseguite dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true, una copia dell’elemento viene inserita nella nuova Sequence. In caso contrario, l’elemento non apparirà nella nuova Sequence.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche filtered() e Concurrent Filter e Filter-Reduce.

template < typename OutputSequence, typename Iterator, typename KeepFunctor > OutputSequence QtConcurrent::blockingFiltered(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction)

Chiama una volta la funzione ` filterFunction ` per ciascun elemento compreso tra ` begin ` e ` end ` e restituisce una nuova sequenza contenente gli elementi conservati. Tutte le chiamate a ` filterFunction ` vengono eseguite dai thread prelevati da ` QThreadPool ` pool. Se ` filterFunction ` restituisce ` true`, una copia dell’elemento viene inserita nella nuova sequenza. In caso contrario, l’elemento non apparirà nella nuova sequenza.

Nota: questa funzione rimane in attesa finché l’iteratore non raggiunge la fine della sequenza in elaborazione.

Vedi anche ` filtered()` e ` Concurrent Filter` e `Filter-Reduce`.

template < typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor > ResultType QtConcurrent::blockingFilteredReduced(Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento presente in sequence. Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Nota: questa funzione rimane in attesa fino a quando tutti gli elementi della sequenza non sono stati elaborati.

Vedi anche ` filteredReduced()` e ` Concurrent Filter` e `Filter-Reduce`.

template < typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor > ResultType QtConcurrent::blockingFilteredReduced(Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento compreso tra begin e end. Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true.

Si noti che, mentre filterFunction viene chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamato reduceFunction è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Nota: questa funzione rimane in attesa finché l’iteratore non raggiunge la fine della sequenza in elaborazione.

Vedi anche filteredReduced() e Filtro concorrente e Filtro-Riduzione.

template < typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor > ResultType QtConcurrent::blockingFilteredReduced(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento presente in sequence. Tutte le chiamate a filterFunction vengono eseguite dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamato reduceFunction è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche ` filteredReduced()` e ` Concurrent Filter` e `Filter-Reduce`.

template < typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor, typename InitialValueType > ResultType QtConcurrent::blockingFilteredReduced(Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento presente in sequence. Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true. Il valore del risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L'ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell'ordine della sequenza originale.

Nota: questa funzione rimane in attesa finché tutti gli elementi della sequenza non sono stati elaborati.

Vedi anche ` filteredReduced()` e ` Concurrent Filter` e `Filter-Reduce`.

template < typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor, typename InitialValueType > ResultType QtConcurrent::blockingFilteredReduced(Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ciascun elemento da begin a end. Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ciascun elemento per cui filterFunction restituisce true. Il valore del risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Nota: questa funzione rimane in attesa finché l’iteratore non raggiunge la fine della sequenza in elaborazione.

Vedi anche filteredReduced() e Filtro concorrente e Filtro-Riduzione.

template < typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor > ResultType QtConcurrent::blockingFilteredReduced(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento compreso tra begin e end. Tutte le chiamate a filterFunction vengono eseguite dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true.

Si noti che, mentre filterFunction viene chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamato reduceFunction è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Nota: questa funzione rimane in attesa finché l’iteratore non raggiunge la fine della sequenza in elaborazione.

Vedi anche filteredReduced() e Filtro concorrente e Filtro-Riduzione.

template < typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor, typename InitialValueType > ResultType QtConcurrent::blockingFilteredReduced(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento presente in sequence. Tutte le chiamate a filterFunction vengono eseguite dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true. Il valore del risultato viene inizializzato a initialValue quando la funzione viene chiamata, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Nota: questa funzione rimane in attesa fino a quando tutti gli elementi della sequenza non sono stati elaborati.

Vedi anche ` filteredReduced()` e ` Concurrent Filter` e `Filter-Reduce`.

template < typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor, typename InitialValueType > ResultType QtConcurrent::blockingFilteredReduced(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento compreso tra begin e end. Tutte le chiamate a filterFunction vengono eseguite dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true. Il valore di risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L'ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell'ordine della sequenza originale.

Nota: questa funzione rimane in attesa finché l’iteratore non raggiunge la fine della sequenza in elaborazione.

Vedi anche ` filteredReduced()` e ` Concurrent Filter` e `Filter-Reduce`.

template <typename Sequence, typename MapFunctor> void QtConcurrent::blockingMap(Sequence &&sequence, MapFunctor &&function)

Chiama una volta la funzione ` function ` per ogni elemento presente in ` sequence`. La funzione ` function ` accetta un riferimento all'elemento, in modo che qualsiasi modifica apportata all'elemento venga riportata in ` sequence`.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche map() e Map e Map-Reduce concorrenti.

template <typename Iterator, typename MapFunctor> void QtConcurrent::blockingMap(Iterator begin, Iterator end, MapFunctor &&function)

Chiama una volta la funzione ` function ` per ogni elemento compreso tra ` begin ` e ` end`. La funzione ` function ` accetta un riferimento all'elemento, in modo che qualsiasi modifica apportata all'elemento venga riportata nella sequenza a cui appartengono gli iteratori.

Nota: questa funzione rimarrà in attesa finché l’iteratore non raggiungerà la fine della sequenza in fase di elaborazione.

Vedi anche ` map()` e ` Map e Map-Reduce concorrenti`.

template <typename Sequence, typename MapFunctor> void QtConcurrent::blockingMap(QThreadPool *pool, Sequence &&sequence, MapFunctor function)

Chiama ` function ` una volta per ogni elemento presente in ` sequence`. Tutte le chiamate a ` function ` vengono eseguite dai thread prelevati da ` QThreadPool ` pool. La funzione ` function ` accetta un riferimento all’elemento, in modo che qualsiasi modifica apportata all’elemento venga riportata in ` sequence`.

Nota: questa funzione rimarrà in attesa finché tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche map() e Map e Map-Reduce concorrenti.

template <typename Iterator, typename MapFunctor> void QtConcurrent::blockingMap(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&function)

Chiama function una volta per ogni elemento compreso tra begin e end. Tutte le chiamate a function vengono eseguite dai thread prelevati da QThreadPool pool . La funzione function accetta un riferimento all'elemento, in modo che qualsiasi modifica apportata all'elemento si rifletta nella sequenza a cui appartengono gli iteratori.

Nota: questa funzione rimarrà in attesa finché l’iteratore non raggiunge la fine della sequenza in fase di elaborazione.

Vedi anche map() e Map e Map-Reduce concorrenti.

template < typename OutputSequence, typename InputSequence, typename MapFunctor > OutputSequence QtConcurrent::blockingMapped(InputSequence &&sequence, MapFunctor &&function)

Chiama una volta la funzion function per ogni elemento contenuto in ` sequence ` e restituisce una sequenza `OutputSequence` contenente i risultati. Il tipo dei risultati corrisponderà al tipo restituito da `MapFunctor`.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche ` mapped()` e ` Concurrent Map` e `Map-Reduce`.

template < typename Sequence, typename Iterator, typename MapFunctor > Sequence QtConcurrent::blockingMapped(Iterator begin, Iterator end, MapFunctor &&function)

Chiama una volta la funzione ` function ` per ogni elemento compreso tra ` begin ` e ` end ` e restituisce un contenitore con i risultati. È possibile specificare il tipo di contenitore come argomento del template, in questo modo:

QList<int> ints = QtConcurrent::blockingMapped<QList<int> >(beginIterator, endIterator, fn);

Nota: questa funzione rimarrà in attesa finché l'iteratore non raggiungerà la fine della sequenza in elaborazione.

Vedi anche mapped() e Map e Map-Reduce concorrenti.

template < typename OutputSequence, typename InputSequence, typename MapFunctor > OutputSequence QtConcurrent::blockingMapped(QThreadPool *pool, InputSequence &&sequence, MapFunctor &&function)

Chiama una volta function per ogni elemento presente in sequence e restituisce una OutputSequence contenente i risultati. Tutte le chiamate a function vengono eseguite dai thread prelevati da QThreadPool pool . Il tipo dei risultati corrisponderà al tipo restituito da MapFunctor.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche mapped() e Map e Map-Reduce concorrenti.

template < typename Sequence, typename Iterator, typename MapFunctor > Sequence QtConcurrent::blockingMapped(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&function)

Chiama una volta la funzione ` function ` per ogni elemento compreso tra ` begin ` e ` end ` e restituisce un contenitore con i risultati. Tutte le chiamate a ` function ` vengono eseguite dai thread prelevati da ` QThreadPool ` pool. È possibile specificare il tipo di contenitore come argomento del template, in questo modo:

QList<int> ints = QtConcurrent::blockingMapped<QList<int> >(beginIterator, endIterator, fn);

Nota: questa funzione rimarrà in attesa fino a quando l’iteratore non raggiungerà la fine della sequenza in elaborazione.

Vedi anche mapped() e Map e Map-Reduce concorrenti.

template < typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor > ResultType QtConcurrent::blockingMappedReduced(Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama ` mapFunction ` una volta per ogni elemento presente in ` sequence`. Il valore restituito da ciascuna chiamata a ` mapFunction ` viene passato a ` reduceFunction`.

Si noti che, sebbene mapFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L'ordine in cui viene chiamato reduceFunction è determinato da reduceOptions.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche ` mapped()` e ` Map` e `Map-Reduce` in concorrenza.

template < typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor > ResultType QtConcurrent::blockingMappedReduced(Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama ` mapFunction ` una volta per ogni elemento da ` begin ` a ` end`. Il valore restituito da ciascun ` mapFunction ` viene passato a ` reduceFunction`.

Si noti che, sebbene mapFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L'ordine in cui viene chiamato reduceFunction non è definito.

Nota: questa funzione rimarrà bloccata finché l’iteratore non raggiunge la fine della sequenza in elaborazione.

Vedi anche ` blockingMappedReduced()` e `Map` e `Map-Reduce` in parallelo.

template < typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor > ResultType QtConcurrent::blockingMappedReduced(QThreadPool *pool, Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama ` mapFunction ` una volta per ogni elemento presente in ` sequence`. Tutte le chiamate a ` mapFunction ` vengono eseguite dai thread prelevati da ` QThreadPool ` pool. Il valore restituito da ogni ` mapFunction ` viene passato a ` reduceFunction`.

Si noti che, sebbene mapFunction venga chiamata in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamata reduceFunction è determinato da reduceOptions.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche mapped() e Map e Map-Reduce in parallelo.

template < typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor, typename InitialValueType > ResultType QtConcurrent::blockingMappedReduced(Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ogni elemento presente in sequence. Il valore restituito da ciascuna chiamata a mapFunction viene passato a reduceFunction. Il valore risultante viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene mapFunction venga chiamata in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamata reduceFunction è determinato da reduceOptions.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche mapped() e Map e Map-Reduce in concorrenza.

template < typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor, typename InitialValueType > ResultType QtConcurrent::blockingMappedReduced(Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ciascun elemento compreso tra begin e end. Il valore restituito da ciascun mapFunction viene passato a reduceFunction. Il valore risultante viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene mapFunction venga chiamata in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamata reduceFunction non è definito.

Nota: questa funzione rimarrà in attesa finché l’iteratore non raggiungerà la fine della sequenza in elaborazione.

Vedi anche blockingMappedReduced() e Map e Map-Reduce in parallelo.

template < typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor > ResultType QtConcurrent::blockingMappedReduced(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama ` mapFunction ` una volta per ogni elemento da ` begin ` a ` end`. Tutte le chiamate a ` mapFunction ` vengono eseguite dai thread prelevati da ` QThreadPool ` pool. Il valore restituito da ogni ` mapFunction ` viene passato a ` reduceFunction`.

Si noti che, sebbene mapFunction venga chiamata in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamata reduceFunction non è definito.

Nota: questa funzione rimarrà in attesa fino a quando l’iteratore non raggiungerà la fine della sequenza in elaborazione.

Vedi anche blockingMappedReduced() e Map e Map-Reduce in parallelo.

template < typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor, typename InitialValueType > ResultType QtConcurrent::blockingMappedReduced(QThreadPool *pool, Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ogni elemento presente in sequence. Tutte le chiamate a mapFunction vengono invocate dai thread prelevati da QThreadPool pool . Il valore restituito da ciascuna chiamata a mapFunction viene passato a reduceFunction. Il valore risultante viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene mapFunction venga chiamata in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamata reduceFunction è determinato da reduceOptions.

Nota: questa funzione rimarrà in attesa fino a quando tutti gli elementi della sequenza non saranno stati elaborati.

Vedi anche mapped() e Map e Map-Reduce in parallelo.

template < typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor, typename InitialValueType > ResultType QtConcurrent::blockingMappedReduced(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ogni elemento compreso tra begin e end. Tutte le chiamate a mapFunction vengono invocate dai thread prelevati da QThreadPool pool . Il valore restituito da ciascuna chiamata a mapFunction viene passato a reduceFunction. Il valore risultante viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene mapFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamato reduceFunction non è definito.

Nota: questa funzione rimarrà in attesa finché l’iteratore non raggiungerà la fine della sequenza in elaborazione.

Vedi anche blockingMappedReduced() e Map e Map-Reduce in parallelo.

template <typename Sequence, typename KeepFunctor> QFuture<void> QtConcurrent::filter(Sequence &sequence, KeepFunctor &&filterFunction)

Chiama ` filterFunction ` una volta per ogni elemento presente in ` sequence`. Se ` filterFunction ` restituisce ` true`, l'elemento viene mantenuto in ` sequence`; in caso contrario, l'elemento viene rimosso da ` sequence`.

Si noti che questo metodo non dispone di un sovraccarico che funzioni con gli iteratori, poiché invalida gli iteratori della sequenza su cui opera.

Vedi anche `Concurrent Filter` e `Filter-Reduce`.

template <typename Sequence, typename KeepFunctor> QFuture<void> QtConcurrent::filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)

Chiama ` filterFunction ` una volta per ogni elemento presente in ` sequence`. Tutte le chiamate a ` filterFunction ` vengono eseguite dai thread prelevati da ` QThreadPool ` pool. Se ` filterFunction ` restituisce ` true`, l'elemento viene mantenuto in ` sequence`; in caso contrario, l'elemento viene rimosso da ` sequence`.

Si noti che questo metodo non dispone di un sovraccarico che funzioni con gli iteratori, poiché invalida gli iteratori della sequenza su cui opera.

Vedi anche `Concurrent Filter` e `Filter-Reduce`.

template <typename Sequence, typename KeepFunctor> QFuture<typename std::decay_t<Sequence>::value_type> QtConcurrent::filtered(Sequence &&sequence, KeepFunctor &&filterFunction)

Chiama una volt filterFunction per ogni elemento presente in ` sequence ` e restituisce una nuova sequenza contenente gli elementi conservati. Se ` filterFunction ` restituisce ` true`, una copia dell’elemento viene inserita nella nuova sequenza. In caso contrario, l’elemento non apparirà nella nuova sequenza.

Vedi anche Concurrent Filter e Filter-Reduce.

template <typename Iterator, typename KeepFunctor> QFuture<typename qValueType<Iterator>::value_type> QtConcurrent::filtered(Iterator begin, Iterator end, KeepFunctor &&filterFunction)

Chiama una volta filterFunction per ogni elemento compreso tra begin e end e restituisce una nuova Sequence contenente gli elementi conservati. Se filterFunction restituisce true, una copia dell’elemento viene inserita nella nuova Sequence. In caso contrario, l’elemento non apparirà nella nuova Sequence.

Vedi anche Concurrent Filter e Filter-Reduce.

template <typename Sequence, typename KeepFunctor> QFuture<typename std::decay_t<Sequence>::value_type> QtConcurrent::filtered(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction)

Chiama una volta filterFunction per ogni elemento presente in sequence e restituisce una nuova Sequence contenente gli elementi conservati. Tutte le chiamate a filterFunction vengono eseguite dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true, una copia dell’elemento viene inserita nella nuova Sequence. In caso contrario, l’elemento non apparirà nella nuova Sequence.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template <typename Iterator, typename KeepFunctor> QFuture<typename qValueType<Iterator>::value_type> QtConcurrent::filtered(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction)

Chiama una volta filterFunction per ogni elemento da begin a end e restituisce una nuova Sequence contenente gli elementi conservati. Tutte le chiamate a filterFunction vengono eseguite dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true, una copia dell’elemento viene inserita nella nuova Sequence. In caso contrario, l’elemento non apparirà nella nuova Sequence.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template < typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor > QFuture<ResultType> QtConcurrent::filteredReduced(Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento presente in sequence. Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true.

Si noti che, mentre ` filterFunction ` viene chiamato in modo concorrente, solo un thread alla volta chiamerà ` reduceFunction`. L’ordine in cui viene chiamato ` reduceFunction ` è indefinito se ` reduceOptions ` è ` QtConcurrent::UnorderedReduce`. Se ` reduceOptions ` è ` QtConcurrent::OrderedReduce`, ` reduceFunction ` viene chiamato nell’ordine della sequenza originale.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template < typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor > QFuture<ResultType> QtConcurrent::filteredReduced(Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento compreso tra begin e end. Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true.

Si noti che, mentre filterFunction viene chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamato reduceFunction è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template < typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor > QFuture<ResultType> QtConcurrent::filteredReduced(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama ` filterFunction ` una volta per ogni elemento contenuto in ` sequence`. Tutte le chiamate a ` filterFunction ` vengono eseguite dai thread prelevati da ` QThreadPool pool `. Se ` filterFunction ` restituisce ` true ` per un elemento, tale elemento viene quindi passato a ` reduceFunction`. In altre parole, il valore restituito è il risultato di ` reduceFunction ` per ogni elemento per cui ` filterFunction ` restituisce ` true`.

Si noti che, mentre filterFunction viene chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template < typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor, typename InitialValueType > QFuture<ResultType> QtConcurrent::filteredReduced(Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento presente in sequence. Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true. Il valore del risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamato reduceFunction è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Vedi anche «Concurrent Filter» e «Filter-Reduce».

template < typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor, typename InitialValueType > QFuture<ResultType> QtConcurrent::filteredReduced(Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento compreso tra begin e end. Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true. Il valore risultante viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template < typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor > QFuture<ResultType> QtConcurrent::filteredReduced(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento da begin a end. Tutte le chiamate a filterFunction vengono invocate dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true.

Si noti che, mentre filterFunction viene chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template < typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor, typename InitialValueType > QFuture<ResultType> QtConcurrent::filteredReduced(QThreadPool *pool, Sequence &&sequence, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento presente in sequence. Tutte le chiamate a filterFunction vengono eseguite dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true. Il valore del risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, reduceFunction viene chiamato nell’ordine della sequenza originale.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template < typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor, typename InitialValueType > QFuture<ResultType> QtConcurrent::filteredReduced(QThreadPool *pool, Iterator begin, Iterator end, KeepFunctor &&filterFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama filterFunction una volta per ogni elemento compreso tra begin e end. Tutte le chiamate a filterFunction vengono eseguite dai thread prelevati da QThreadPool pool . Se filterFunction restituisce true per un elemento, tale elemento viene quindi passato a reduceFunction. In altre parole, il valore restituito è il risultato di reduceFunction per ogni elemento per cui filterFunction restituisce true. Il valore del risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene filterFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L'ordine in cui reduceFunction viene chiamato è indefinito se reduceOptions è QtConcurrent::UnorderedReduce. Se reduceOptions è QtConcurrent::OrderedReduce, l'reduceFunction viene chiamato nell'ordine della sequenza originale.

Vedi anche «Filtro concorrente»e «Filtro-Riduzione».

template <typename Sequence, typename MapFunctor> QFuture<void> QtConcurrent::map(Sequence &&sequence, MapFunctor &&function)

Chiama ` function ` una volta per ogni elemento presente in ` sequence`. La funzione ` function ` accetta un riferimento all'elemento, in modo che qualsiasi modifica apportata all'elemento venga riportata in ` sequence`.

Vedi anche *Concurrent Map* e *Map-Reduce*.

template <typename Iterator, typename MapFunctor> QFuture<void> QtConcurrent::map(Iterator begin, Iterator end, MapFunctor &&function)

Chiama una volta la funzione ` function ` per ogni elemento compreso tra ` begin ` e ` end`. La funzione ` function ` accetta un riferimento all’elemento, in modo che qualsiasi modifica apportata all’elemento si rifletta nella sequenza a cui appartengono gli iteratori.

Vedi anche Concurrent Map e Map-Reduce.

template <typename Sequence, typename MapFunctor> QFuture<void> QtConcurrent::map(QThreadPool *pool, Sequence &&sequence, MapFunctor &&function)

Chiama ` function ` una volta per ogni elemento presente in ` sequence`. Tutte le chiamate a ` function ` vengono eseguite dai thread prelevati da ` QThreadPool ` pool. La funzione ` function ` accetta un riferimento all’elemento, in modo che qualsiasi modifica apportata all’elemento venga riportata in ` sequence`.

Vedi anche Map concorrente e Map-Reduce.

template <typename Iterator, typename MapFunctor> QFuture<void> QtConcurrent::map(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&function)

Chiama una volta function per ogni elemento compreso tra begin e end. Tutte le chiamate a function vengono eseguite dai thread prelevati da QThreadPool pool . La funzione function accetta un riferimento all’elemento, in modo che qualsiasi modifica apportata all’elemento venga riportata nella sequenza a cui appartengono gli iteratori.

Vedi anche Map concorrente e Map-Reduce.

template <typename Sequence, typename MapFunctor> QFuture<QtPrivate::MapResultType<Sequence, MapFunctor>> QtConcurrent::mapped(Sequence &&sequence, MapFunctor &&function)

Chiama una volt function per ogni elemento presente in ` sequence ` e restituisce un `future` contenente come risultato ciascun elemento mappato. È possibile utilizzare ` QFuture::const_iterator ` o ` QFutureIterator ` per iterare attraverso i risultati.

Vedi anche Concurrent Map e Map-Reduce.

template <typename Iterator, typename MapFunctor> QFuture<QtPrivate::MapResultType<Iterator, MapFunctor>> QtConcurrent::mapped(Iterator begin, Iterator end, MapFunctor &&function)

Chiama una volta la funzione ` function ` per ciascun elemento compreso tra ` begin ` e ` end ` e restituisce un `Future` contenente come risultato ciascun elemento mappato. È possibile utilizzare ` QFuture::const_iterator ` o ` QFutureIterator ` per iterare attraverso i risultati.

Vedi anche «Concurrent Map» e «Map-Reduce».

template <typename Sequence, typename MapFunctor> QFuture<QtPrivate::MapResultType<Sequence, MapFunctor>> QtConcurrent::mapped(QThreadPool *pool, Sequence &&sequence, MapFunctor &&function)

Chiama una volta function per ogni elemento presente in sequence e restituisce un future con ciascun elemento mappato come risultato. Tutte le chiamate a function vengono eseguite dai thread prelevati da QThreadPool pool . È possibile utilizzare QFuture::const_iterator o QFutureIterator per iterare attraverso i risultati.

Vedi anche Map concorrente e Map-Reduce.

template <typename Iterator, typename MapFunctor> QFuture<QtPrivate::MapResultType<Iterator, MapFunctor>> QtConcurrent::mapped(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&function)

Chiama una volta function per ogni elemento compreso tra begin e end e restituisce un future con ciascun elemento mappato come risultato. Tutte le chiamate a function vengono eseguite dai thread prelevati da QThreadPool pool . È possibile utilizzare QFuture::const_iterator o QFutureIterator per iterare attraverso i risultati.

Vedi anche Map concorrente e Map-Reduce.

template < typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor > QFuture<ResultType> QtConcurrent::mappedReduced(Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama ` mapFunction ` una volta per ogni elemento presente in ` sequence`. Il valore restituito da ciascuna chiamata a ` mapFunction ` viene passato a ` reduceFunction`.

Si noti che, sebbene mapFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamato reduceFunction è determinato da reduceOptions.

Vedi anche Map concorrente e Map-Reduce.

template < typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor > QFuture<ResultType> QtConcurrent::mappedReduced(Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama ` mapFunction ` una volta per ogni elemento compreso tra ` begin ` e ` end`. Il valore restituito da ogni ` mapFunction ` viene passato a ` reduceFunction`.

Si noti che, sebbene mapFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. Per impostazione predefinita, l'ordine in cui viene chiamato reduceFunction non è definito.

Nota: QtConcurrent::OrderedReduce determina una riduzione ordinata.

Vedi anche Map concorrente e Map-Reduce.

template < typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor > QFuture<ResultType> QtConcurrent::mappedReduced(QThreadPool *pool, Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ogni elemento presente in sequence. Tutte le chiamate a mapFunction vengono eseguite dai thread prelevati da QThreadPool pool . Il valore restituito da ciascun mapFunction viene passato a reduceFunction.

Si noti che, sebbene mapFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamato reduceFunction è determinato da reduceOptions.

Vedi anche Map concorrente e Map-Reduce.

template < typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor, typename InitialValueType > QFuture<ResultType> QtConcurrent::mappedReduced(Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ogni elemento presente in sequence. Il valore restituito da ciascuna chiamata a mapFunction viene passato a reduceFunction. Il valore risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene mapFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui viene chiamato reduceFunction è determinato da reduceOptions.

Vedi anche Map concorrente e Map-Reduce.

template < typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor, typename InitialValueType > QFuture<ResultType> QtConcurrent::mappedReduced(Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ogni elemento compreso tra begin e end. Il valore restituito da ciascun mapFunction viene passato a reduceFunction. Il valore del risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene mapFunction venga chiamata in modo concorrente, solo un thread alla volta chiamerà reduceFunction. Per impostazione predefinita, l’ordine in cui viene chiamata reduceFunction è indefinito.

Nota: ` QtConcurrent::OrderedReduce ` produce una riduzione ordinata.

Vedi anche Map concorrente e Map-Reduce.

template < typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor > QFuture<ResultType> QtConcurrent::mappedReduced(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ogni elemento compreso tra begin e end. Tutte le chiamate a mapFunction vengono invocate dai thread prelevati da QThreadPool pool . Il valore restituito da ciascuna chiamata a mapFunction viene passato a reduceFunction.

Si noti che, sebbene mapFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. Per impostazione predefinita, l’ordine in cui viene chiamato reduceFunction è indefinito.

Nota: QtConcurrent::OrderedReduce determina una riduzione ordinata.

Vedi anche Map concorrente e Map-Reduce.

template < typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor, typename InitialValueType > QFuture<ResultType> QtConcurrent::mappedReduced(QThreadPool *pool, Sequence &&sequence, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ogni elemento presente in sequence. Tutte le chiamate a mapFunction vengono eseguite dai thread prelevati da QThreadPool pool . Il valore restituito da ciascuna chiamata a mapFunction viene passato a reduceFunction. Il valore risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, sebbene mapFunction venga chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. L’ordine in cui reduceFunction viene chiamato è determinato da reduceOptions.

Vedi anche Map concorrente e Map-Reduce.

template < typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor, typename InitialValueType > QFuture<ResultType> QtConcurrent::mappedReduced(QThreadPool *pool, Iterator begin, Iterator end, MapFunctor &&mapFunction, ReduceFunctor &&reduceFunction, InitialValueType &&initialValue, QtConcurrent::ReduceOptions reduceOptions = ReduceOptions(UnorderedReduce | SequentialReduce))

Chiama mapFunction una volta per ogni elemento compreso tra begin e end. Tutte le chiamate a mapFunction vengono eseguite dai thread prelevati da QThreadPool pool . Il valore di ritorno di ogni mapFunction viene passato a reduceFunction. Il valore di risultato viene inizializzato a initialValue al momento della chiamata alla funzione, e la prima chiamata a reduceFunction opererà su questo valore.

Si noti che, mentre mapFunction viene chiamato in modo concorrente, solo un thread alla volta chiamerà reduceFunction. Per impostazione predefinita, l’ordine in cui viene chiamato reduceFunction è indefinito.

Nota: QtConcurrent::OrderedReduce determina una riduzione ordinata.

Vedi anche Map concorrente e Map-Reduce.

template <typename T> QFuture<T> QtConcurrent::run(Function function, ...)

Equivalente a

QtConcurrent::run(QThreadPool::globalInstance(), function, ...);

Esegue function in un thread separato. Il thread viene prelevato dal campo globale QThreadPool. Si noti che function potrebbe non essere eseguito immediatamente; function verrà eseguito solo quando un thread sarà disponibile.

In modalità base, T è dello stesso tipo del valore di ritorno di function. È possibile accedere ai valori di ritorno non di tipo void tramite la funzione QFuture::result().

In modalità base, il QFuture restituito può essere utilizzato solo per interrogare lo stato di esecuzione/completamento e il valore di ritorno della funzione. In particolare, l’annullamento o la sospensione possono essere effettuati solo se i calcoli alla base del future non sono stati avviati.

Nella modalità «run with promise», l’ function deve restituire void e deve accettare un argomento aggiuntivo di tipo QPromise<T> &, posizionato come primo argomento nell’elenco degli argomenti della funzione. T è il tipo del risultato ed è lo stesso dell’ QFuture<T> restituito.

Nella modalità "run with promise", analogamente alla modalità di base, l'oggetto ` QFuture ` restituito può essere utilizzato per interrogare lo stato di esecuzione (in corso o terminato) e il valore riportato dalla funzione. Inoltre, può essere utilizzato per sospendere o annullare l'attività in esecuzione, recuperare più risultati dall'` function ` chiamato o monitorare lo stato di avanzamento riportato dall'` function`.

Vedi anche Esecuzione concorrente (modalità base), Esecuzione concorrente con Promise e QThreadPool::start().

template <typename T> QFuture<T> QtConcurrent::run(QThreadPool *pool, Function function, ...)

Pianificazioni function su pool. Si noti che function potrebbe non essere eseguito immediatamente; function verrà eseguito solo quando sarà disponibile un thread.

In modalità base, T è dello stesso tipo del valore di ritorno di function. È possibile accedere ai valori di ritorno non di tipo void tramite la funzione QFuture::result().

In modalità base, il QFuture restituito può essere utilizzato solo per interrogare lo stato di esecuzione/completamento e il valore di ritorno della funzione. In particolare, l’annullamento o la sospensione possono essere effettuati solo se i calcoli alla base del future non sono stati avviati.

Nella modalità «run with promise», l’ function deve restituire un valore void e deve accettare un argomento aggiuntivo di tipo QPromise<T> &, posizionato come primo argomento nell’elenco degli argomenti della funzione. T è il tipo di risultato ed è lo stesso dell’ QFuture<T> restituito.

Nella modalità "run with promise", analogamente alla modalità di base, l'oggetto ` QFuture ` restituito può essere utilizzato per interrogare lo stato di esecuzione (in corso/completato) e il valore riportato dalla funzione. Inoltre, può essere utilizzato per sospendere o annullare l'attività in esecuzione, recuperare più risultati dall'` function ` chiamato o monitorare lo stato di avanzamento riportato dall'` function`.

Vedi anche Esecuzione concorrente (modalità base), Esecuzione concorrente con Promise e QThreadPool::start().

[since 6.0] template <typename Task> QtConcurrent::QTaskBuilder<Task> QtConcurrent::task(Task &&task)

Crea un'istanza di ` QtConcurrent::QTaskBuilder`. Questo oggetto può essere utilizzato per regolare alcuni parametri ed eseguire ` task ` in un thread separato.

Questa funzione è stata introdotta in Qt 6.0.

Vedi anche Concurrent Task e QtConcurrent::QTaskBuilder.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. 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.