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

Unified Diff: runtime/vm/thread_pool.cc

Issue 1134003005: Automatic thread cleanup on non-Windows platforms. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_pool.cc
===================================================================
--- runtime/vm/thread_pool.cc (revision 45815)
+++ runtime/vm/thread_pool.cc (working copy)
@@ -274,11 +274,8 @@
// Release monitor while handling the task.
monitor_.Exit();
- Thread::EnsureInit();
task->Run();
ASSERT(Isolate::Current() == NULL);
- // Prevent unintended sharing of state between tasks.
- Thread::CleanUp();
delete task;
monitor_.Enter();
@@ -318,6 +315,7 @@
// static
void ThreadPool::Worker::Main(uword args) {
+ Thread::EnsureInit();
Worker* worker = reinterpret_cast<Worker*>(args);
worker->Loop();
@@ -333,6 +331,9 @@
ml.Notify();
}
delete worker;
+#if defined(TARGET_OS_WINDOWS)
+ Thread::CleanUp();
+#endif
}
} // namespace dart
« no previous file with comments | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698