- Extending Qt Creator Manual
- TaskTree
- QBarrier
- Extending Qt Creator Manual 19.0.2

# QBarrier Class

An asynchronous task that finishes on demand. More...

Header: | `#include <qbarriertask.h>`
Inherited By: | QStartedBarrier

- List of all members, including inherited members

Note: All functions in this class are reentrant.

## Signals

void | done(QtTaskTree::DoneResult result)

## Detailed Description

QBarrier waits for subsequent calls to advance() to reach the barrier's limit (1 by default). It finishes with DoneResult::Success.

It's often used in QTaskTree recipes to hold the execution of subsequent sequential tasks until some other running task delivers some data which are needed to setup the subsequent tasks.

## Member Function Documentation

### `[private signal]` void QBarrier::done(QtTaskTree::DoneResult result)

This signal is emitted when the barrier finished, passing the final result of the execution.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.