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 #include "vm/thread_pool.h" | 5 #include "vm/thread_pool.h" |
6 | 6 |
7 #include "vm/flags.h" | 7 #include "vm/flags.h" |
8 #include "vm/lockers.h" | 8 #include "vm/lockers.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 } | 464 } |
465 } else { | 465 } else { |
466 // This worker is going down because it was idle for too long. This case | 466 // This worker is going down because it was idle for too long. This case |
467 // is not due to a ThreadPool Shutdown. Thus, we simply delete the worker. | 467 // is not due to a ThreadPool Shutdown. Thus, we simply delete the worker. |
468 // The worker's id is added to the thread pool's join list by | 468 // The worker's id is added to the thread pool's join list by |
469 // ReleaseIdleWorker, so in the case that the thread pool begins shutting | 469 // ReleaseIdleWorker, so in the case that the thread pool begins shutting |
470 // down immediately after returning from worker->Loop() above, we still | 470 // down immediately after returning from worker->Loop() above, we still |
471 // wait for the thread to exit by joining on it in Shutdown(). | 471 // wait for the thread to exit by joining on it in Shutdown(). |
472 delete worker; | 472 delete worker; |
473 } | 473 } |
474 #if defined(TARGET_OS_WINDOWS) | |
475 Thread::CleanUp(); | |
476 #endif | |
477 } | 474 } |
478 | 475 |
479 } // namespace dart | 476 } // namespace dart |
OLD | NEW |