14 #ifndef OR_TOOLS_MATH_OPT_CORE_CONCURRENT_CALLS_GUARD_H_
15 #define OR_TOOLS_MATH_OPT_CORE_CONCURRENT_CALLS_GUARD_H_
19 #include "absl/base/thread_annotations.h"
20 #include "absl/status/statusor.h"
21 #include "absl/synchronization/mutex.h"
63 bool in_a_call_ ABSL_GUARDED_BY(mutex_) =
false;
75 : tracker_(std::exchange(other.tracker_, nullptr)) {}
Tracker(const Tracker &)=delete
Tracker & operator=(const Tracker &)=delete
ConcurrentCallsGuard & operator=(ConcurrentCallsGuard &&)=delete
ConcurrentCallsGuard(ConcurrentCallsGuard &&other)
ConcurrentCallsGuard & operator=(const ConcurrentCallsGuard &)=delete
static absl::StatusOr< ConcurrentCallsGuard > TryAcquire(Tracker &tracker)
ConcurrentCallsGuard(const ConcurrentCallsGuard &)=delete