|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
RAII helper that sets the thread-local Context for its scope. More...
#include <session.hpp>
Public Member Functions | |
| ScopedContext (const Context &ctx) | |
Installs ctx as the thread-local context until the scope exits. | |
| ~ScopedContext () | |
| Restores the thread-local context that was active at construction. | |
| ScopedContext (const ScopedContext &)=delete | |
| ScopedContext & | operator= (const ScopedContext &)=delete |
| ScopedContext (ScopedContext &&)=delete | |
| ScopedContext & | operator= (ScopedContext &&)=delete |
RAII helper that sets the thread-local Context for its scope.
Definition at line 315 of file session.hpp.
|
inlineexplicit |
Installs ctx as the thread-local context until the scope exits.
| ctx | Context whose address is stored; must outlive this object. |
Definition at line 319 of file session.hpp.
|
inline |
Restores the thread-local context that was active at construction.
Definition at line 321 of file session.hpp.