v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::base::Thread Class Referenceabstract

#include <platform.h>

Inheritance diagram for v8::base::Thread:
Collaboration diagram for v8::base::Thread:

Classes

class  Options
 
class  PlatformData
 

Public Types

enum class  Priority { kBestEffort , kUserVisible , kUserBlocking , kDefault }
 
using LocalStorageKey = int32_t
 

Public Member Functions

 Thread (const Options &options)
 
 Thread (const Thread &)=delete
 
Threadoperator= (const Thread &)=delete
 
virtual ~Thread ()
 
V8_WARN_UNUSED_RESULT bool Start ()
 
bool StartSynchronously ()
 
void Join ()
 
const char * name () const
 
virtual void Run ()=0
 
PlatformDatadata ()
 
Priority priority () const
 
void NotifyStartedAndRun ()
 

Static Public Member Functions

static LocalStorageKey CreateThreadLocalKey ()
 
static void DeleteThreadLocalKey (LocalStorageKey key)
 
static void * GetThreadLocal (LocalStorageKey key)
 
static void SetThreadLocal (LocalStorageKey key, void *value)
 
static bool HasThreadLocal (LocalStorageKey key)
 
static void * GetExistingThreadLocal (LocalStorageKey key)
 

Static Public Attributes

static const int kMaxThreadNameLength = 16
 

Private Member Functions

void set_name (const char *name)
 

Private Attributes

PlatformDatadata_
 
char name_ [kMaxThreadNameLength]
 
int stack_size_
 
Priority priority_
 
Semaphorestart_semaphore_
 

Detailed Description

Definition at line 533 of file platform.h.

Member Typedef Documentation

◆ LocalStorageKey

Definition at line 541 of file platform.h.

Member Enumeration Documentation

◆ Priority

enum class v8::base::Thread::Priority
strong
Enumerator
kBestEffort 
kUserVisible 
kUserBlocking 
kDefault 

Definition at line 546 of file platform.h.

Constructor & Destructor Documentation

◆ Thread() [1/2]

v8::base::Thread::Thread ( const Options & options)
explicit

Definition at line 1154 of file platform-posix.cc.

Here is the call graph for this function:

◆ Thread() [2/2]

v8::base::Thread::Thread ( const Thread & )
delete

◆ ~Thread()

v8::base::Thread::~Thread ( )
virtual

Definition at line 1164 of file platform-posix.cc.

Member Function Documentation

◆ CreateThreadLocalKey()

Thread::LocalStorageKey v8::base::Thread::CreateThreadLocalKey ( )
static

Definition at line 1312 of file platform-posix.cc.

Here is the call graph for this function:

◆ data()

PlatformData * v8::base::Thread::data ( )
inline

Definition at line 622 of file platform.h.

◆ DeleteThreadLocalKey()

void v8::base::Thread::DeleteThreadLocalKey ( LocalStorageKey key)
static

Definition at line 1324 of file platform-posix.cc.

Here is the call graph for this function:

◆ GetExistingThreadLocal()

static void * v8::base::Thread::GetExistingThreadLocal ( LocalStorageKey key)
inlinestatic

Definition at line 612 of file platform.h.

◆ GetThreadLocal()

void * v8::base::Thread::GetThreadLocal ( LocalStorageKey key)
static

Definition at line 1332 of file platform-posix.cc.

Here is the call graph for this function:

◆ HasThreadLocal()

static bool v8::base::Thread::HasThreadLocal ( LocalStorageKey key)
inlinestatic

Definition at line 600 of file platform.h.

◆ Join()

void v8::base::Thread::Join ( )

Definition at line 1272 of file platform-posix.cc.

Here is the caller graph for this function:

◆ name()

const char * v8::base::Thread::name ( ) const
inline

Definition at line 588 of file platform.h.

◆ NotifyStartedAndRun()

void v8::base::Thread::NotifyStartedAndRun ( )
inline

Definition at line 625 of file platform.h.

Here is the caller graph for this function:

◆ operator=()

Thread & v8::base::Thread::operator= ( const Thread & )
delete

◆ priority()

Priority v8::base::Thread::priority ( ) const
inline

Definition at line 623 of file platform.h.

◆ Run()

◆ set_name()

void v8::base::Thread::set_name ( const char * name)
private

Definition at line 1236 of file platform-posix.cc.

Here is the caller graph for this function:

◆ SetThreadLocal()

void v8::base::Thread::SetThreadLocal ( LocalStorageKey key,
void * value )
static

Definition at line 1338 of file platform-posix.cc.

Here is the call graph for this function:

◆ Start()

bool v8::base::Thread::Start ( )

Definition at line 1241 of file platform-posix.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartSynchronously()

bool v8::base::Thread::StartSynchronously ( )
inline

Definition at line 576 of file platform.h.

Here is the caller graph for this function:

Member Data Documentation

◆ data_

PlatformData* v8::base::Thread::data_
private

Definition at line 633 of file platform.h.

◆ kMaxThreadNameLength

const int v8::base::Thread::kMaxThreadNameLength = 16
static

Definition at line 619 of file platform.h.

◆ name_

char v8::base::Thread::name_[kMaxThreadNameLength]
private

Definition at line 635 of file platform.h.

◆ priority_

Priority v8::base::Thread::priority_
private

Definition at line 637 of file platform.h.

◆ stack_size_

int v8::base::Thread::stack_size_
private

Definition at line 636 of file platform.h.

◆ start_semaphore_

Semaphore* v8::base::Thread::start_semaphore_
private

Definition at line 638 of file platform.h.


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