mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 05:43:37 +00:00
committed by
Konstantin Pastbin
parent
c9cbb64f12
commit
76ffc99abd
20
libs/base/threaded_container.hpp
Normal file
20
libs/base/threaded_container.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "base/cancellable.hpp"
|
||||
#include "base/timer.hpp"
|
||||
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
|
||||
struct ThreadedContainer : public base::Cancellable
|
||||
{
|
||||
protected:
|
||||
base::Timer m_Timer;
|
||||
|
||||
std::mutex m_condLock;
|
||||
std::condition_variable m_Cond;
|
||||
|
||||
public:
|
||||
/// Cancellable overrides:
|
||||
void Cancel() override;
|
||||
};
|
||||
Reference in New Issue
Block a user