cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
|
Helper class for asynchronous processing. More...
#include <Cutelyst/async.h>
Public Member Functions | |
ASync () noexcept | |
ASync (ASync &&other) noexcept | |
ASync (const ASync &other) | |
ASync (Context *c) | |
ASync (Context *c, std::function< void(Context *c)> cb) | |
~ASync () | |
ASync & | operator= (ASync &&other) noexcept |
ASync & | operator= (const ASync ©) |
ASync helps with asynchronous processing. It automatically calls Context::detachAsync() on the given context on construction and will call Context::attachAsync() on it’s own destruction if the context pointer given in the constructor is still valid.
|
defaultnoexcept |
Constructs a new default ASync object containing a nullptr
.
ASync::ASync | ( | Context * | c | ) |
ASync class should be used in a scoped manner.
This constructor will call c->detachAsync() on context c and once it goes out of scope it will call c->attachAsync() if Context pointer is still valid.
Make sure it is captured by lambdas to avoid it leaving scope.
ASync class should be used in a scoped manner.
This constructor will call c->detachAsync() on context c and once it goes out of scope if Context pointer is still valid it will call the callback function cb and then c->attachAsync().
Make sure it is captured by lambdas to avoid it leaving scope.
ASync::ASync | ( | const ASync & | other | ) |
|
noexcept |
|
default |
Destroys the ASync object.