15 #ifndef PSEN_SCAN_V2_STANDALONE_ASYNC_BARRIER_H 16 #define PSEN_SCAN_V2_STANDALONE_ASYNC_BARRIER_H 34 template <
class Rep,
class Period>
35 bool waitTillRelease(
const std::chrono::duration<Rep, Period>& timeout)
const;
40 const std::future<void>
future_{ barrier_.get_future() };
51 template <
class Rep,
class Period>
54 return future_.wait_for(timeout) == std::future_status::ready;
60 #endif // PSEN_SCAN_V2_STANDALONE_ASYNC_BARRIER_H Helper class to simplify the synchronization between different threads.
bool waitTillRelease(const std::chrono::duration< Rep, Period > &timeout) const
std::promise< void > barrier_
std::atomic_flag is_released_
const std::future< void > future_
Root namespace in which the software components to communicate with the scanner (firmware-version: 2)...