Skip to content

Run sync/async std::function on main/background threads

Notifications You must be signed in to change notification settings

kerwinzxc/qt-dispatch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dispatch

Run sync/async std::function on main/background threads

Dispatch::async

Dispatch::async(Dispatch::Background, []() {
    qDebug() << "Hello from async";
});
qDebug() << "Next line";

Output:

Next line
Hello from async

Dispatch::sync

Dispatch::sync(Dispatch::Background, []() {
    qDebug() << "Hello from sync";
});
qDebug() << "Next line";

Output:

Hello from sync
Next line

About

Run sync/async std::function on main/background threads

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%