Asynchronous programming in Qt/C++ using tasks,continuations and resumable functions.
The project seeks to do async based programming in Qt/C++ using modern C++ with lambdas.
This library wraps a function into a future where the result of the wrapped function can be retrieved through the future's 3 public methods:
.get() This method runs the wrapped function on the current thread and could block the thread and hang GUI.
.then() This method does three things:
1. Registers a method to be called when a wrapped function finish running. 2. Runs the wrapped function on a background thread. 3. Runs the registered method on the current thread when the wrapped function finish running.
.await() This method does three things:
1. Suspends the current thread at a point where this method is called. 2. Creates a background thread and then runs the wrapped function in the background thread. 3. Unsuspends the current thread when the wrapped function finish and let the thread current continue normally. The suspension at step 1 is done without blocking the thread and hence the suspension can be done in the GUI thread and the GUI will remain responsive. recommending reading up on C#'s await keyword to get a sense of how .await() works.
Example use case for the Task::run().then() API can be found here. Additional example is  where an API is declared and  where the declared API is used.
Example use case of the Task::await() API is here where a function call "blocks" waiting for a result without "hanging" the entire GUI application.
A short tutorial on task/async/await as implemented in C# can be viewed from this link.
 Disscussion about this can be found on the following link among other places: http://isocpp.org/files/papers/N3558.pdf
 Disscussion about this can be found on the following link among other places: http://isocpp.org/files/papers/N3564.pdf