All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
utils.h File Reference
+ Include dependency graph for utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
void WorkSwapDestroyAsync (T &obj)
 Swap obj with a default-constructed T instance, return and arrange for the swapped-out instance to be destroyed asynchronously.
 
template<class T >
void WorkMoveDestroyAsync (T &obj)
 Like WorkSwapDestroyAsync() but instead, move from obj, leaving it in a moved-from state instead of a default constructed state.
 

Function Documentation

◆ WorkMoveDestroyAsync()

void WorkMoveDestroyAsync ( T &  obj)

Like WorkSwapDestroyAsync() but instead, move from obj, leaving it in a moved-from state instead of a default constructed state.

Definition at line 78 of file utils.h.

◆ WorkSwapDestroyAsync()

void WorkSwapDestroyAsync ( T &  obj)

Swap obj with a default-constructed T instance, return and arrange for the swapped-out instance to be destroyed asynchronously.

This means that any code that obj's destructor might invoke must be safe to run both concurrently with other code and at any point in the future. This might not be true, for example, if obj's destructor might try to update some other data structure that could be destroyed by the time obj's destruction occurs. Be careful.

Definition at line 66 of file utils.h.