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

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

Issue 1175233004: WorkerThread: drop unnecessary interfaces to simplify (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review #5 Created 5 years, 6 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 | « Source/core/workers/WorkerMessagingProxy.cpp ('k') | 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 fa0f296e5ac51c0c55210f5d51d5e346f7e95be6..123c359c5c2e85b2a978322fe92da7f87c7d3c53 100644
--- a/Source/core/workers/WorkerThread.h
+++ b/Source/core/workers/WorkerThread.h
@@ -61,8 +61,8 @@ public:
virtual ~WorkerThread();
// Called on the main thread.
- virtual void start(PassOwnPtr<WorkerThreadStartupData>);
- virtual void stop();
+ void start(PassOwnPtr<WorkerThreadStartupData>);
+ void terminate();
// Returns the thread this worker runs on. Some implementations can create
// a new thread on the first call (e.g. shared, dedicated workers), whereas
@@ -76,14 +76,13 @@ public:
v8::Isolate* isolate() const { return m_isolate; }
// 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)
+ // (This is signaled on the main thread, so it's assumed to be waited on
+ // the worker context thread)
WebWaitableEvent* shutdownEvent() { return m_shutdownEvent.get(); }
- WebWaitableEvent* terminationEvent() { return m_terminationEvent.get(); }
-
- // Called in shutdown sequence. Internally calls stop() (or stopInternal)
- // and wait (by *blocking* the calling thread) until the worker(s) is/are
- // shut down.
+ // Called in shutdown sequence. Internally calls terminate() (or
+ // terminateInternal) and wait (by *blocking* the calling thread) until the
+ // worker(s) is/are shut down.
void terminateAndWait();
static void terminateAndWaitForAllWorkers();
@@ -109,8 +108,7 @@ public:
WorkerGlobalScope* workerGlobalScope() const { return m_workerGlobalScope.get(); }
- // Returns true once stop() (or one of the terminate* methods which
- // internally calls stop) is called.
+ // Returns true once one of the terminate* methods is called.
bool terminated();
// Number of active worker threads.
@@ -141,7 +139,7 @@ private:
friend class WorkerMicrotaskRunner;
// Called on the main thread.
- void stopInternal();
+ void terminateInternal();
// Called on the worker thread.
void initialize(PassOwnPtr<WorkerThreadStartupData>);
« no previous file with comments | « Source/core/workers/WorkerMessagingProxy.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698