#include "FWCore/Utilities/interface/CallOnceNoWait.h"
Public Member Functions | |
CallOnceNoWait () | |
template<typename T > | |
void | operator() (T iCall) |
Private Attributes | |
std::atomic< bool > | m_called |
Description: Thread safe way to do something 1 time
Usage: This class allows one to safely do a 'non-side-effect' operation 1 time in a job. An example use would be
The important thing to remember, is there is no guarantee that the operation being run finishes before a thread which doesn't get to run the operation reaches the code following the call. Therefore it is useful to suppress messages but should not be used to do something like filling a container with values since the filling is not guaranteed to complete before another thread skips the call.
Definition at line 40 of file CallOnceNoWait.h.
|
inline |
Definition at line 42 of file CallOnceNoWait.h.
|
inline |
|
private |
Definition at line 53 of file CallOnceNoWait.h.
Referenced by operator()().