fixed some testing bugs

This commit is contained in:
Jonas Zeunert
2018-07-10 23:49:35 +02:00
parent 14b5118038
commit cfccb67561
6 changed files with 22 additions and 12 deletions

View File

@@ -32,7 +32,9 @@ public:
T pop()
{
std::unique_lock<std::mutex> lock(this->d_mutex);
// TODO die queue funzt net weil wir nich pushen koennen wenn wir im pop warten
// TODO denk ma ueber future nach
std::unique_lock<std::mutex> lock(this->d_mutex);
this->d_condition.wait(lock, [=]{ return !this->p_queue.empty(); });
T rc = *this->p_queue.end();
this->p_queue.pop();