OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef BIN_THREAD_POOL_H_ | 5 #ifndef BIN_THREAD_POOL_H_ |
6 #define BIN_THREAD_POOL_H_ | 6 #define BIN_THREAD_POOL_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 | |
10 #include "platform/globals.h" | 9 #include "platform/globals.h" |
11 | 10 |
12 // Declare the OS-specific types ahead of defining the generic classes. | 11 // Declare the OS-specific types ahead of defining the generic classes. |
13 #if defined(TARGET_OS_LINUX) | 12 #if defined(TARGET_OS_LINUX) |
14 #include "bin/thread_pool_linux.h" | 13 #include "bin/thread_pool_linux.h" |
15 #elif defined(TARGET_OS_MACOS) | 14 #elif defined(TARGET_OS_MACOS) |
16 #include "bin/thread_pool_macos.h" | 15 #include "bin/thread_pool_macos.h" |
17 #elif defined(TARGET_OS_WINDOWS) | 16 #elif defined(TARGET_OS_WINDOWS) |
18 #include "bin/thread_pool_win.h" | 17 #include "bin/thread_pool_win.h" |
19 #else | 18 #else |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 static void* Main(void* args); | 72 static void* Main(void* args); |
74 | 73 |
75 TaskQueue queue; | 74 TaskQueue queue; |
76 int size_; // Number of threads. | 75 int size_; // Number of threads. |
77 ThreadPoolData data_; | 76 ThreadPoolData data_; |
78 | 77 |
79 DISALLOW_COPY_AND_ASSIGN(ThreadPool); | 78 DISALLOW_COPY_AND_ASSIGN(ThreadPool); |
80 }; | 79 }; |
81 | 80 |
82 #endif // BIN_THREAD_POOL_H_ | 81 #endif // BIN_THREAD_POOL_H_ |
OLD | NEW |