Cutelyst  2.14.2
Public Member Functions | List of all members
Cutelyst::ASync Class Reference

Public Member Functions

 ASync (Context *c)
 ASync class should be used in a scoped manner. More...
 
 ASync (Context *c, std::function< void(Context *c)> cb)
 
 ASync (const ASync &other)
 Copy constructor.
 
ASyncoperator= (const ASync &copy)
 

Detailed Description

Definition at line 30 of file async.h.

Constructor & Destructor Documentation

ASync::ASync ( Context c)

This constructor will call c->detachAsync() 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.

Parameters
c

Definition at line 65 of file async.cpp.

References Cutelyst::Context::detachAsync().