DO not set the timethread as high priority, it can starve the server threads

Former-commit-id: faeac65371af9d6b6effe0886bcbdefaec24ad6d
This commit is contained in:
John Sully 2021-04-09 01:05:55 +00:00
parent 40fdf5670c
commit c92b90eb91

View File

@ -6471,9 +6471,6 @@ int main(int argc, char **argv) {
serverAssert(cserver.cthreads > 0 && cserver.cthreads <= MAX_EVENT_LOOPS); serverAssert(cserver.cthreads > 0 && cserver.cthreads <= MAX_EVENT_LOOPS);
pthread_create(&cserver.time_thread_id, nullptr, timeThreadMain, nullptr); pthread_create(&cserver.time_thread_id, nullptr, timeThreadMain, nullptr);
struct sched_param time_thread_priority;
time_thread_priority.sched_priority = sched_get_priority_max(SCHED_FIFO);
pthread_setschedparam(cserver.time_thread_id, SCHED_FIFO, &time_thread_priority);
pthread_attr_t tattr; pthread_attr_t tattr;
pthread_attr_init(&tattr); pthread_attr_init(&tattr);