Index: runtime/vm/thread_pool.cc |
diff --git a/runtime/vm/thread_pool.cc b/runtime/vm/thread_pool.cc |
index b281d5c47fb6344392ca24a817418a2d6d9f216f..70bac99675bfd66b65c0e53418dea7ae99caf57d 100644 |
--- a/runtime/vm/thread_pool.cc |
+++ b/runtime/vm/thread_pool.cc |
@@ -4,6 +4,7 @@ |
#include "vm/thread_pool.h" |
+#include "vm/dart.h" |
#include "vm/flags.h" |
#include "vm/lockers.h" |
@@ -480,6 +481,12 @@ void ThreadPool::Worker::Main(uword args) { |
// wait for the thread to exit by joining on it in Shutdown(). |
delete worker; |
} |
+ |
+ // Call the thread exit hook here to notify the embedder that the |
+ // thread pool thread is exiting. |
+ if (Dart::thread_exit_callback() != NULL) { |
+ (*Dart::thread_exit_callback())(); |
+ } |
} |
} // namespace dart |