// Copyright (C) 2020 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \class QtConcurrent::QTaskBuilder \inmodule QtConcurrent \brief The QTaskBuilder class is used for adjusting task parameters. \since 6.0 \ingroup thread It's not possible to create an object of this class manually. See \l {Concurrent Task} for more details and usage examples. */ /*! \fn template [[nodiscard]] QFuture QtConcurrent::QTaskBuilder::spawn() Runs the task in a separate thread and returns a future object immediately. This is a non-blocking call. The task might not start immediately. */ /*! \fn template void QtConcurrent::QTaskBuilder::spawn(QtConcurrent::FutureResult) Runs the task in a separate thread. This is a non-blocking call. The task might not start immediately. */ /*! \fn template template [[nodiscard]] QTaskBuilder QtConcurrent::QTaskBuilder::withArguments(ExtraArgs &&...args) Sets the arguments \a args the task will be invoked with. The code is ill-formed (causes compilation errors) if: \list \li This function is invoked more than once. \li The arguments count is zero. \endlist */ /*! \fn template [[nodiscard]] QTaskBuilder &QtConcurrent::QTaskBuilder::onThreadPool(QThreadPool &newThreadPool) Sets the thread pool \a newThreadPool that the task will be invoked on. */ /*! \fn template [[nodiscard]] QTaskBuilder &QtConcurrent::QTaskBuilder::withPriority(int newPriority) Sets the priority \a newPriority that the task will be invoked with. */ /*! \typedef QtConcurrent::InvokeResultType \relates QtConcurrent::QTaskBuilder The simplified definition of this type looks like this: \code template using InvokeResultType = std::invoke_result_t, std::decay_t...>; \endcode The real implementation also contains a compile-time check for whether the task can be invoked with the specified arguments or not. */ /*! \enum QtConcurrent::FutureResult This enum type is used to invoke a special overload of QtConcurrent::QTaskBuilder::spawn(QtConcurrent::FutureResult) that doesn't return a future object. \value Ignore An auxiliary tag which introduced to improve code readability. */