MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / reset

Method reset

source/MRMesh/MRSharedThreadSafeOwner.cpp:48–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47template<typename T>
48void SharedThreadSafeOwner<T>::reset()
49{
50 assert( !construction_ ); // one thread constructs the object, and this thread resets it
51 if ( !obj_ ) // fast path avoiding unnecessary writing in obj_ when it is already null
52 return;
53 atomic_store( &obj_, {} );
54}
55
56template<typename T>
57void SharedThreadSafeOwner<T>::update( const std::function<void(T&)> & updater )

Callers 1

updateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected