v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <default-platform.h>
Public Member Functions | |
DefaultPlatform () | |
virtual | ~DefaultPlatform () |
void | SetThreadPoolSize (int thread_pool_size) |
void | EnsureInitialized () |
virtual void | CallOnBackgroundThread (Task *task, ExpectedRuntime expected_runtime) V8_OVERRIDE |
virtual void | CallOnForegroundThread (v8::Isolate *isolate, Task *task) V8_OVERRIDE |
Additional Inherited Members | |
Public Types inherited from Platform | |
enum | ExpectedRuntime { kShortRunningTask, kLongRunningTask } |
Protected Member Functions inherited from Platform | |
virtual | ~Platform () |
Definition at line 46 of file default-platform.h.
DefaultPlatform | ( | ) |
Definition at line 42 of file default-platform.cc.
|
virtual |
Definition at line 46 of file default-platform.cc.
References TaskQueue::Terminate().
|
virtual |
Schedules a task to be invoked on a background thread. |expected_runtime| indicates that the task will run a long time. The Platform implementation takes ownership of |task|. There is no guarantee about order of execution of tasks wrt order of scheduling, nor is there a guarantee about the thread the task will be run on.
Implements Platform.
Definition at line 76 of file default-platform.cc.
References TaskQueue::Append(), and DefaultPlatform::EnsureInitialized().
|
virtual |
Schedules a task to be invoked on a foreground thread wrt a specific |isolate|. Tasks posted for the same isolate should be execute in order of scheduling. The definition of "foreground" is opaque to V8.
Implements Platform.
Definition at line 83 of file default-platform.cc.
References Task::Run().
void EnsureInitialized | ( | ) |
Definition at line 67 of file default-platform.cc.
Referenced by DefaultPlatform::CallOnBackgroundThread(), and V8::Initialize().
void SetThreadPoolSize | ( | int | thread_pool_size | ) |
Definition at line 58 of file default-platform.cc.
References ASSERT, v8::internal::Max(), and v8::internal::Min().
Referenced by V8::Initialize().