v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
worker-thread.cc
Go to the documentation of this file.
1// Copyright 2013 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
9
10namespace v8 {
11namespace platform {
12
14 : Thread(Options("V8 WorkerThread")), queue_(queue) {
15 CHECK(Start());
16}
17
19 Join();
20}
21
23 while (std::unique_ptr<Task> task = queue_->GetNext()) {
24 task->Run();
25 }
26}
27
28} // namespace platform
29} // namespace v8
std::unique_ptr< Task > GetNext()
Definition task-queue.cc:31
WorkerThread(TaskQueue *queue)
#define CHECK(condition)
Definition logging.h:124