diff options
Diffstat (limited to 'chromium/v8/src/libplatform/worker-thread.h')
-rw-r--r-- | chromium/v8/src/libplatform/worker-thread.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/chromium/v8/src/libplatform/worker-thread.h b/chromium/v8/src/libplatform/worker-thread.h new file mode 100644 index 00000000000..20b9add4cdb --- /dev/null +++ b/chromium/v8/src/libplatform/worker-thread.h @@ -0,0 +1,38 @@ +// 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 "src/base/macros.h" +#include "src/platform.h" + +namespace v8 { + +namespace internal { + +class TaskQueue; + +class WorkerThread : public Thread { + public: + explicit WorkerThread(TaskQueue* queue); + virtual ~WorkerThread(); + + // Thread implementation. + virtual void Run() V8_OVERRIDE; + + private: + friend class QuitTask; + + TaskQueue* queue_; + + DISALLOW_COPY_AND_ASSIGN(WorkerThread); +}; + +} } // namespace v8::internal + + +#endif // V8_LIBPLATFORM_WORKER_THREAD_H_ |