#include <MapUpdater.h>
MapUpdater::MapUpdater |
( |
| ) |
|
|
inline |
size_t pending_requests
Definition: MapUpdater.h:59
std::atomic< bool > _cancelationToken
Definition: MapUpdater.h:55
MapUpdater::~MapUpdater |
( |
| ) |
|
|
inline |
void MapUpdater::activate |
( |
size_t |
num_threads | ) |
|
49 for (
size_t i = 0; i < num_threads; ++i)
std::vector< std::thread > _workerThreads
Definition: MapUpdater.h:54
void WorkerThread()
Definition: MapUpdater.cpp:102
bool MapUpdater::activated |
( |
| ) |
|
std::vector< std::thread > _workerThreads
Definition: MapUpdater.h:54
void MapUpdater::deactivate |
( |
| ) |
|
std::vector< std::thread > _workerThreads
Definition: MapUpdater.h:54
std::atomic< bool > _cancelationToken
Definition: MapUpdater.h:55
void Cancel()
Definition: ProducerConsumerQueue.h:86
void wait()
Definition: MapUpdater.cpp:69
ProducerConsumerQueue< MapUpdateRequest * > _queue
Definition: MapUpdater.h:52
void MapUpdater::schedule_update |
( |
Map & |
map, |
|
|
uint32 |
diff |
|
) |
| |
81 std::lock_guard<std::mutex> lock(
_lock);
size_t pending_requests
Definition: MapUpdater.h:59
friend class MapUpdateRequest
Definition: MapUpdater.h:36
std::mutex _lock
Definition: MapUpdater.h:57
void Push(const T &value)
Definition: ProducerConsumerQueue.h:40
ProducerConsumerQueue< MapUpdateRequest * > _queue
Definition: MapUpdater.h:52
void MapUpdater::update_finished |
( |
| ) |
|
|
private |
95 std::lock_guard<std::mutex> lock(
_lock);
size_t pending_requests
Definition: MapUpdater.h:59
std::mutex _lock
Definition: MapUpdater.h:57
std::condition_variable _condition
Definition: MapUpdater.h:58
void MapUpdater::wait |
( |
| ) |
|
71 std::unique_lock<std::mutex> lock(
_lock);
size_t pending_requests
Definition: MapUpdater.h:59
std::mutex _lock
Definition: MapUpdater.h:57
std::condition_variable _condition
Definition: MapUpdater.h:58
void MapUpdater::WorkerThread |
( |
| ) |
|
|
private |
void WaitAndPop(T &value)
Definition: ProducerConsumerQueue.h:69
std::atomic< bool > _cancelationToken
Definition: MapUpdater.h:55
Definition: MapUpdater.cpp:25
void call()
Definition: MapUpdater.cpp:40
ProducerConsumerQueue< MapUpdateRequest * > _queue
Definition: MapUpdater.h:52
std::atomic<bool> MapUpdater::_cancelationToken |
|
private |
std::condition_variable MapUpdater::_condition |
|
private |
std::mutex MapUpdater::_lock |
|
private |
std::vector<std::thread> MapUpdater::_workerThreads |
|
private |
size_t MapUpdater::pending_requests |
|
private |
The documentation for this class was generated from the following files: