Merge pull request #8460 from Morph1984/bounded-q

bounded_threadsafe_queue: Use constexpr capacity and mask
This commit is contained in:
liamwhite 2022-06-15 19:39:22 -04:00 committed by GitHub
commit 0ae4eae9a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 74 additions and 87 deletions

View file

@ -98,7 +98,7 @@ struct CommandDataContainer {
struct SynchState final {
using CommandQueue = Common::MPSCQueue<CommandDataContainer>;
std::mutex write_lock;
CommandQueue queue{512}; // size must be 2^n
CommandQueue queue;
u64 last_fence{};
std::atomic<u64> signaled_fence{};
std::condition_variable_any cv;