Tasking::WaitForBarrier: Rename it into WaitForBarrierTask

Rename BarrierAdapter into BarrierTaskAdapter.

Task-number: QTCREATORBUG-29102
Change-Id: I003b09fd71af1bde870f761d365a8cea1858862a
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2023-05-03 14:45:54 +02:00
parent 161228d275
commit 82bc4870b3
3 changed files with 18 additions and 18 deletions

View File

@@ -34,16 +34,16 @@ private:
int m_current = -1;
};
class QTCREATOR_UTILS_EXPORT BarrierAdapter : public Tasking::TaskAdapter<Barrier>
class QTCREATOR_UTILS_EXPORT BarrierTaskAdapter : public Tasking::TaskAdapter<Barrier>
{
public:
BarrierAdapter() { connect(task(), &Barrier::done, this, &TaskInterface::done); }
BarrierTaskAdapter() { connect(task(), &Barrier::done, this, &TaskInterface::done); }
void start() final { task()->start(); }
};
} // namespace Utils
QTC_DECLARE_CUSTOM_TASK(BarrierTask, Utils::BarrierAdapter);
QTC_DECLARE_CUSTOM_TASK(BarrierTask, Utils::BarrierTaskAdapter);
namespace Utils::Tasking {
@@ -70,11 +70,11 @@ using MultiBarrier = TreeStorage<SharedBarrier<Limit>>;
// alias template deduction only available with C++20.
using SingleBarrier = MultiBarrier<1>;
class QTCREATOR_UTILS_EXPORT WaitForBarrier : public BarrierTask
class QTCREATOR_UTILS_EXPORT WaitForBarrierTask : public BarrierTask
{
public:
template <int Limit>
WaitForBarrier(const MultiBarrier<Limit> &sharedBarrier)
WaitForBarrierTask(const MultiBarrier<Limit> &sharedBarrier)
: BarrierTask([sharedBarrier](Barrier &barrier) {
SharedBarrier<Limit> *activeBarrier = sharedBarrier.activeStorage();
if (!activeBarrier) {

View File

@@ -349,7 +349,7 @@ static Group interDeviceTransferTask(const FilePath &source, const FilePath &des
Storage(storage),
Writer(setupWriter),
Group {
WaitForBarrier(writerReadyBarrier),
WaitForBarrierTask(writerReadyBarrier),
Reader(setupReader, finalizeReader, finalizeReader)
}
};