v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DefaultPlatform Class Reference

#include <default-platform.h>

Inheritance diagram for DefaultPlatform:
Collaboration diagram for DefaultPlatform:

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 ()
 

Detailed Description

Definition at line 46 of file default-platform.h.

Constructor & Destructor Documentation

Definition at line 42 of file default-platform.cc.

~DefaultPlatform ( )
virtual

Definition at line 46 of file default-platform.cc.

References TaskQueue::Terminate().

Member Function Documentation

void CallOnBackgroundThread ( Task task,
ExpectedRuntime  expected_runtime 
)
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().

void CallOnForegroundThread ( v8::Isolate isolate,
Task task 
)
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().


The documentation for this class was generated from the following files: