1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
<!--
SPDX-FileCopyrightText: 2022 Daniel Vrátil <dvratil@kde.org>
SPDX-License-Identifier: GFDL-1.3-or-later
-->
# Coro module
The Coro module contains the fundamental coroutine types - the
[QCoro::Task<T>][qcoro-task] for eager coroutines,
[QCoro::LazyTask<T>][qcoro-lazytask] for lazy coroutines,
[QCoro::Generator<T>][qcoro-generator] for synchronous generators and
[QCoro::AsyncGenerator<T>][qcoro-asyncgenerator] for asynchronous generators.
Another useful bit of the Coro module is the [qCoro()][qcoro-coro] wrapper
function that wraps native Qt types into a coroutine-friendly versions supported by
QCoro (check the [Core][qcoro-core], [Network][qcoro-network] and
[DBus][qcoro-dbus] modules of QCoro to see which
Qt types are currently supported by QCoro).
If you don't want to use any of the Qt types supported by QCoro in your
code, but you still want to use C++ coroutines with QCoro, you can simply
just link against `QCoro::Coro` target in your CMakeLists.txt. This will
give you all you need to start implementing custom coroutine-native types
with Qt and QCoro.
[qcoro-task]: task.md
[qcoro-lazytask]: lazytask.md
[qcoro-coro]: coro.md
[qcoro-generator]: generator.md
[qcoro-asyncgenerator]: asyncgenerator.md
[qcoro-core]: ../core/index.md
[qcoro-network]: ../network/index.md
[qcoro-dbus]: ../dbus/index.md
|