forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworker-thread.h
More file actions
39 lines (26 loc) · 898 Bytes
/
worker-thread.h
File metadata and controls
39 lines (26 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// 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.
#ifndef V8_LIBPLATFORM_WORKER_THREAD_H_
#define V8_LIBPLATFORM_WORKER_THREAD_H_
#include <queue>
#include "include/libplatform/libplatform-export.h"
#include "src/base/compiler-specific.h"
#include "src/base/platform/platform.h"
namespace v8 {
namespace platform {
class TaskQueue;
class V8_PLATFORM_EXPORT WorkerThread : public NON_EXPORTED_BASE(base::Thread) {
public:
explicit WorkerThread(TaskQueue* queue);
~WorkerThread() override;
WorkerThread(const WorkerThread&) = delete;
WorkerThread& operator=(const WorkerThread&) = delete;
// Thread implementation.
void Run() override;
private:
TaskQueue* queue_;
};
} // namespace platform
} // namespace v8
#endif // V8_LIBPLATFORM_WORKER_THREAD_H_