mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 12:40:06 +00:00
Common/Barrier: add method to get current generation
This commit is contained in:
parent
969dc3b46f
commit
fbad420240
@ -79,9 +79,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
std::size_t Generation() const {
|
||||
std::unique_lock<std::mutex> lk(mutex);
|
||||
return generation;
|
||||
}
|
||||
|
||||
private:
|
||||
std::condition_variable condvar;
|
||||
std::mutex mutex;
|
||||
mutable std::mutex mutex;
|
||||
std::size_t count;
|
||||
std::size_t waiting = 0;
|
||||
std::size_t generation = 0; // Incremented once each time the barrier is used
|
||||
|
Loading…
Reference in New Issue
Block a user