Category : queue

I am trying to create a std::vector with a fixed size array that accepts uint64_t values, and then push that vector into a std::queue. I am able to create the vector with: vector<uint64_t[10]> tmp_data(255); which if I understand correctly is "a vector with 10 arrays of size 255 and accepts uint64_t values" int main() { ..

Read more

Its supposed to clean-up the std::queue 3 seconds after last call of AddPoints function, in a thread-safe way. Each call should delay the clean-up to 3 seconds. There should be only one Process thread running at time. class PointsHandler { public: struct Points { void* source; int points; }; void Process() { std::unique_lock<std::mutex> lock(mtx); // ..

Read more