Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: runtime/vm/thread_pool.h

Issue 1978153002: Uses an open thread handle as the ThreadJoinId on Windows. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix test Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/thread_interrupter.cc ('k') | runtime/vm/thread_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 VM_THREAD_POOL_H_ 5 #ifndef VM_THREAD_POOL_H_
6 #define VM_THREAD_POOL_H_ 6 #define VM_THREAD_POOL_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/os_thread.h" 10 #include "vm/os_thread.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 bool RemoveWorkerFromIdleList(Worker* worker); 119 bool RemoveWorkerFromIdleList(Worker* worker);
120 bool RemoveWorkerFromAllList(Worker* worker); 120 bool RemoveWorkerFromAllList(Worker* worker);
121 121
122 void AddWorkerToShutdownList(Worker* worker); 122 void AddWorkerToShutdownList(Worker* worker);
123 bool RemoveWorkerFromShutdownList(Worker* worker); 123 bool RemoveWorkerFromShutdownList(Worker* worker);
124 124
125 void ReapExitedIdleThreads(); 125 void ReapExitedIdleThreads();
126 126
127 // Worker operations. 127 // Worker operations.
128 void SetIdleLocked(Worker* worker); // Assumes mutex_ is held.
128 void SetIdleAndReapExited(Worker* worker); 129 void SetIdleAndReapExited(Worker* worker);
129 bool ReleaseIdleWorker(Worker* worker); 130 bool ReleaseIdleWorker(Worker* worker);
130 131
131 Mutex mutex_; 132 Mutex mutex_;
132 bool shutting_down_; 133 bool shutting_down_;
133 Worker* all_workers_; 134 Worker* all_workers_;
134 Worker* idle_workers_; 135 Worker* idle_workers_;
135 uint64_t count_started_; 136 uint64_t count_started_;
136 uint64_t count_stopped_; 137 uint64_t count_stopped_;
137 uint64_t count_running_; 138 uint64_t count_running_;
138 uint64_t count_idle_; 139 uint64_t count_idle_;
139 140
140 Monitor exit_monitor_; 141 Monitor exit_monitor_;
141 Worker* shutting_down_workers_; 142 Worker* shutting_down_workers_;
142 JoinList* join_list_; 143 JoinList* join_list_;
143 144
144 DISALLOW_COPY_AND_ASSIGN(ThreadPool); 145 DISALLOW_COPY_AND_ASSIGN(ThreadPool);
145 }; 146 };
146 147
147 } // namespace dart 148 } // namespace dart
148 149
149 #endif // VM_THREAD_POOL_H_ 150 #endif // VM_THREAD_POOL_H_
OLDNEW
« no previous file with comments | « runtime/vm/thread_interrupter.cc ('k') | runtime/vm/thread_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698