fix infinite loop on fence wait timeout
authorJacob Lifshay <programmerjake@gmail.com>
Sat, 16 Sep 2017 01:59:38 +0000 (18:59 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Sat, 16 Sep 2017 01:59:38 +0000 (18:59 -0700)
src/vulkan/api_objects.h

index cf44431d314e65ce11966f7dc7fd0ca07863df19..c35ed35c838bb1b2bd064a53512704ada87fe344 100644 (file)
@@ -1601,7 +1601,10 @@ private:
             while(wait_count != 0)
             {
                 if(end_time)
-                    cond.wait_until(lock_it, *end_time);
+                {
+                    if(cond.wait_until(lock_it, *end_time) == std::cv_status::timeout)
+                        break;
+                }
                 else
                     cond.wait(lock_it);
             }