redis thread now uses this_thread::yield()

This commit is contained in:
Grant Limberg 2022-06-22 10:07:55 -07:00
parent 436f481a34
commit 17bc9d3085
No known key found for this signature in database
GPG Key ID: 8F2F97D3BE8D7735

View File

@ -216,7 +216,7 @@ PostgreSQL::PostgreSQL(const Identity &myId, const char *path, int listenPort, R
opts.port = _rc->port;
opts.password = _rc->password;
opts.db = 0;
poolOpts.size = 10;
poolOpts.size = 25;
if (_rc->clusterMode) {
fprintf(stderr, "Using Redis in Cluster Mode\n");
_cluster = std::make_shared<sw::redis::RedisCluster>(opts, poolOpts);
@ -1706,7 +1706,7 @@ void PostgreSQL::onlineNotification_Redis()
fprintf(stderr, "onlineNotification ran in %llu ms\n", total);
std::this_thread::sleep_for(std::chrono::seconds(1));
std::this_thread::yield();
}
}