Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
QCoro/QCoroCore
✓ #include <QCoro/QCoroCore>
Use QCoro to sleep in a coroutine
#include <QCoro/QCoroCore>
#include <QCoreApplication>
#include <QTimer>
#include <iostream>
QCoro::Task<> asyncTask() {
co_await QCoro::sleepFor(std::chrono::seconds(1));
std::cout << "Hello from coroutine!" << std::endl;
}
int main(int argc, char *argv[]) {
QCoreApplication app(argc, argv);
asyncTask();
QTimer::singleShot(2000, &app, &QCoreApplication::quit);
return app.exec();
}
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.