From edbe9ce86fbf74073ef5ae7fb612d7c36a7472fd Mon Sep 17 00:00:00 2001 From: Matthew Bennice Date: Tue, 5 Sep 2023 05:05:05 -0700 Subject: [PATCH] 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 --- src/thread/thread_pool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thread/thread_pool.h b/src/thread/thread_pool.h index d8526d54..e987318e 100644 --- a/src/thread/thread_pool.h +++ b/src/thread/thread_pool.h @@ -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); }