33 const String &block_dependency,
34 const String &wakeup_dependency)
36 m_block_dependency(block_dependency), m_wakeup_dependency(wakeup_dependency) {
47 auto now = chrono::steady_clock::now();
49 auto diff = chrono::duration_cast<chrono::milliseconds>(
m_expire_time-now);
50 HT_INFOF(
"Barrier for %s will be up for %lld milliseconds",
53 now = chrono::steady_clock::now();
65 return "OperationTimedBarrier";
69 return "TimedBarrier";
74 auto new_time = chrono::steady_clock::now() + chrono::milliseconds(millis);
String m_wakeup_dependency
OperationTimedBarrier(ContextPtr &context, const String &block_dependency, const String &wakeup_dependency)
ContextPtr m_context
Pointer to Master context.
Abstract base class for ephemeral operations.
std::string String
A String is simply a typedef to std::string.
Declarations for OperationProcessor.
virtual const String label()
Human readable label for operation.
const char * get_text(int32_t state)
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
Compatibility Macros for C/C++.
std::condition_variable m_cond
long long int Lld
Shortcut for printf formats.
DependencySet m_obstructions
Set of obstructions.
#define HT_INFOF(msg,...)
String m_block_dependency
Error codes, Exception handling, error logging.
std::chrono::steady_clock::time_point m_expire_time
void advance_into_future(uint32_t millis)
virtual void execute()
Executes (carries out) the operation.
virtual const String name()
Name of operation used for exclusivity.