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

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

Issue 138303002: Add blink::WebWaitableEvent interface (blink side) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WebVector Created 6 years, 11 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 | « no previous file | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerThread.h
diff --git a/Source/core/workers/WorkerThread.h b/Source/core/workers/WorkerThread.h
index 83bf3f445e41e95042e7eabd0af2408d8394f039..a58d1e7210f8386f38f266b3ee47b6a08cdb1191 100644
--- a/Source/core/workers/WorkerThread.h
+++ b/Source/core/workers/WorkerThread.h
@@ -35,6 +35,10 @@
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
+namespace blink {
+class WebWaitableEvent;
+}
+
namespace WebCore {
class KURL;
@@ -53,6 +57,10 @@ namespace WebCore {
bool start();
void stop();
+ // Can be used to wait for this worker thread to shut down.
+ // (This is signalled on the main thread, so it's assumed to be waited on the worker context thread)
+ blink::WebWaitableEvent* shutdownEvent() { return m_shutdownEvent.get(); }
+
bool isCurrentThread() const;
WorkerRunLoop& runLoop() { return m_runLoop; }
WorkerLoaderProxy& workerLoaderProxy() const { return m_workerLoaderProxy; }
@@ -93,6 +101,9 @@ namespace WebCore {
OwnPtr<WorkerThreadStartupData> m_startupData;
NotificationClient* m_notificationClient;
+
+ // Used to signal thread shutdown.
+ OwnPtr<blink::WebWaitableEvent> m_shutdownEvent;
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698