31#include <sptk5/Exception.h>
36 mutable std::mutex m_mutex;
38 typename std::list<T>::iterator m_position;
43 m_position = m_list.end();
48 std::scoped_lock lock(m_mutex);
49 m_position = m_list.end();
53 void add(
const T& data)
55 std::scoped_lock lock(m_mutex);
56 m_list.push_back(data);
57 m_position = m_list.end();
63 std::scoped_lock lock(m_mutex);
71 std::scoped_lock lock(m_mutex);
75 if (m_position == m_list.end())
76 m_position = m_list.begin();
82 std::scoped_lock lock(m_mutex);
SPTK generic exception class.
Definition: Exception.h:56