blob: a8225533e3c672d8ccf2785e7d562e1f87771808 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "globaltasktree.h"
#include "qtcassert.h"
#include "shutdownguard.h"
#include "threadutils.h"
namespace Utils {
static QParallelTaskTreeRunner *getRunner()
{
static GuardedObject<QParallelTaskTreeRunner> theRunner;
return theRunner.get();
}
QParallelTaskTreeRunner *GlobalTaskTree::taskTreeRunner()
{
QTC_ASSERT(Utils::isMainThread(), return nullptr);
return getRunner();
}
} // namespace Utils
|