All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utils.h File Reference
+ Include dependency graph for utils.h:

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. More...
 
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. More...
 

Function Documentation

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 95 of file utils.h.

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 83 of file utils.h.