All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utils.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/work/api.h"
#include "pxr/base/work/detachedTask.h"
#include <utility>
+ 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.


struct  Work_AsyncMoveDestroyHelper< T >
struct  Work_AsyncSwapDestroyHelper< T >


WORK_API bool 
Work_ShouldSynchronizeAsyncDestroyCalls ()
template<class T >
void WorkSwapDestroyAsync (T &obj)
template<class T >
void WorkMoveDestroyAsync (T &obj)

Function Documentation

PXR_NAMESPACE_OPEN_SCOPE WORK_API bool Work_ShouldSynchronizeAsyncDestroyCalls ( )
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.

Definition at line 95 of file utils.h.

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