add doxygen via opencode
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
/*! \file piconditionvar.h
|
||||
* \ingroup Thread
|
||||
* \~\brief
|
||||
* \~english Conditional variable
|
||||
* \~russian Conditional variable
|
||||
*/
|
||||
//! \file piconditionvar.h
|
||||
//! \ingroup Thread
|
||||
//! \brief
|
||||
//! \~english Conditional variable
|
||||
//! \~russian Условная переменная
|
||||
//!
|
||||
//! \details
|
||||
//! \~english Object able to block the calling thread until notified to resume.
|
||||
//! \~russian Объект, способный заблокировать вызывающий поток до уведомления о продолжении.
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
|
||||
@@ -36,27 +39,39 @@
|
||||
* It uses a PIMutex to lock the thread when one of its wait functions is called. The thread remains
|
||||
* blocked until woken up by another thread that calls a notification function on the same PIConditionVariable object.
|
||||
*/
|
||||
//! \~english Condition variable for thread synchronization
|
||||
//! \~russian Условная переменная для синхронизации потоков
|
||||
class PIP_EXPORT PIConditionVariable {
|
||||
public:
|
||||
NO_COPY_CLASS(PIConditionVariable);
|
||||
//! \~english Constructs condition variable
|
||||
//! \~russian Создает условную переменную
|
||||
explicit PIConditionVariable();
|
||||
//! \~english Destroys condition variable
|
||||
//! \~russian Уничтожает условную переменную
|
||||
virtual ~PIConditionVariable();
|
||||
|
||||
/**
|
||||
* \brief Unblocks one of the threads currently waiting for this condition. If no threads are waiting, the function
|
||||
* does nothing. If more than one, it is unspecified which of the threads is selected.
|
||||
*/
|
||||
//! \~english Wakes one waiting thread
|
||||
//! \~russian Будит один ожидающий поток
|
||||
void notifyOne();
|
||||
|
||||
/**
|
||||
* \brief Unblocks all threads currently waiting for this condition. If no threads are waiting, the function does
|
||||
* nothing.
|
||||
*/
|
||||
//! \~english Wakes all waiting threads
|
||||
//! \~russian Будит все ожидающие потоки
|
||||
void notifyAll();
|
||||
|
||||
/**
|
||||
* \brief see wait(PIMutex &, const std::function<bool()>&)
|
||||
*/
|
||||
//! \~english Wait until notified
|
||||
//! \~russian Ожидает уведомления
|
||||
virtual void wait(PIMutex & lk);
|
||||
|
||||
/**
|
||||
@@ -83,11 +98,15 @@ public:
|
||||
* @param condition A callable object or function that takes no arguments and returns a value that can be evaluated
|
||||
* as a bool. This is called repeatedly until it evaluates to true.
|
||||
*/
|
||||
//! \~english Wait until notified with condition predicate
|
||||
//! \~russian Ожидает уведомления с условием
|
||||
virtual void wait(PIMutex & lk, const std::function<bool()> & condition);
|
||||
|
||||
/**
|
||||
* \brief see waitFor(PIMutex &, int, const std::function<bool()>&)
|
||||
*/
|
||||
//! \~english Wait for timeout
|
||||
//! \~russian Ожидает таймаут
|
||||
virtual bool waitFor(PIMutex & lk, PISystemTime timeout);
|
||||
|
||||
/**
|
||||
@@ -115,6 +134,8 @@ public:
|
||||
* as a bool. This is called repeatedly until it evaluates to true.
|
||||
* @return false if timeout reached or true if wakeup condition is true
|
||||
*/
|
||||
//! \~english Wait for timeout or until notified with condition predicate
|
||||
//! \~russian Ожидает таймаут или уведомление с условием
|
||||
virtual bool waitFor(PIMutex & lk, PISystemTime timeout, const std::function<bool()> & condition);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user