Correct use of number_of_threads_ in an array length definition. It should be max_number_of_threads to allow Windows to compile it, GCC tolerates the variable length array.

PiperOrigin-RevId: 562743538
Change-Id: I5dc6dfb54002a996fe129b91e599cccfc9420e9c
This commit is contained in:
Matthew Bennice
2023-09-05 05:05:05 -07:00
committed by Copybara-Service
parent 6225186964
commit edbe9ce86f
+1 -1
View File
@@ -55,7 +55,7 @@ class ThreadPool {
}
shutdown_ = true;
Task shutdown_tasks[number_of_threads_];
Task shutdown_tasks[max_number_of_threads];
for (int i = 0; i < number_of_threads_; ++i) {
Enqueue(&shutdown_tasks[i], ShutdownFunction, nullptr);
}