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

Unified Diff: Source/core/workers/WorkerThread.cpp

Issue 704063002: Terminate and wait the worker thread in ~WebEmbeddedWorkerImpl() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « Source/core/workers/WorkerThread.h ('k') | Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerThread.cpp
diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
index 8c20669eba7588ac47291a2f52e4b2a0e5cd0f5b..6a0ad514baf928787325d3b33eb458c05488f8c3 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -416,6 +416,12 @@ void WorkerThread::stopInShutdownSequence()
stopInternal();
}
+void WorkerThread::terminateAndWait()
+{
+ stop();
+ m_terminationEvent->wait();
+}
+
bool WorkerThread::terminated()
{
MutexLocker lock(m_threadCreationMutex);
« no previous file with comments | « Source/core/workers/WorkerThread.h ('k') | Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698