/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/src/libplatform/worker-thread.cc
29 строк
646 B
Myles Borins
deps: update V8 to 7.8.279.9
07 окт 2019, 10:19
Не верифицирован
07 окт 2019, 10:19
f7f6c92
Код
Авторство
О чём код?
// Copyright 2013 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/libplatform/worker-thread.h" #include "include/v8-platform.h" #include "src/libplatform/task-queue.h" namespace v8 { namespace platform { WorkerThread::WorkerThread(TaskQueue* queue) : Thread(Options("V8 WorkerThread")), queue_(queue) { CHECK(Start()); } WorkerThread::~WorkerThread() { Join(); } void WorkerThread::Run() { while (std::unique_ptr<Task> task = queue_->GetNext()) { task->Run(); } } } // namespace platform } // namespace v8