瀏覽代碼

just sleep 1 second

Grant Limberg 3 年之前
父節點
當前提交
c1384422c3
共有 1 個文件被更改,包括 1 次插入5 次删除
  1. 1 5
      controller/PostgreSQL.cpp

+ 1 - 5
controller/PostgreSQL.cpp

@@ -1711,11 +1711,7 @@ void PostgreSQL::onlineNotification_Redis()
 
 		fprintf(stderr, "onlineNotification ran in %llu ms\n", total);
 
-		if (count > 0) {
-			std::this_thread::yield();
-		} else {
-			std::this_thread::sleep_for(std::chrono::seconds(1));
-		}
+		std::this_thread::sleep_for(std::chrono::seconds(1));
 	}
 }