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

#include <default-job.h>

Inheritance diagram for v8::platform::DefaultJobHandle:
Collaboration diagram for v8::platform::DefaultJobHandle:

Public Member Functions

 DefaultJobHandle (std::shared_ptr< DefaultJobState > state)
 
 ~DefaultJobHandle () override
 
 DefaultJobHandle (const DefaultJobHandle &)=delete
 
DefaultJobHandleoperator= (const DefaultJobHandle &)=delete
 
void NotifyConcurrencyIncrease () override
 
void Join () override
 
void Cancel () override
 
void CancelAndDetach () override
 
bool IsActive () override
 
bool IsValid () override
 
bool UpdatePriorityEnabled () const override
 
void UpdatePriority (TaskPriority) override
 
- Public Member Functions inherited from v8::JobHandle
virtual ~JobHandle ()=default
 

Private Attributes

std::shared_ptr< DefaultJobStatestate_
 

Detailed Description

Definition at line 104 of file default-job.h.

Constructor & Destructor Documentation

◆ DefaultJobHandle() [1/2]

v8::platform::DefaultJobHandle::DefaultJobHandle ( std::shared_ptr< DefaultJobState > state)
explicit

Definition at line 225 of file default-job.cc.

◆ ~DefaultJobHandle()

v8::platform::DefaultJobHandle::~DefaultJobHandle ( )
override

Definition at line 228 of file default-job.cc.

◆ DefaultJobHandle() [2/2]

v8::platform::DefaultJobHandle::DefaultJobHandle ( const DefaultJobHandle & )
delete

Member Function Documentation

◆ Cancel()

void v8::platform::DefaultJobHandle::Cancel ( )
overridevirtual

Forces all existing workers to yield ASAP. Waits until they have all returned from the Job's callback before returning.

Implements v8::JobHandle.

Definition at line 234 of file default-job.cc.

◆ CancelAndDetach()

void v8::platform::DefaultJobHandle::CancelAndDetach ( )
overridevirtual

Implements v8::JobHandle.

Definition at line 239 of file default-job.cc.

◆ IsActive()

bool v8::platform::DefaultJobHandle::IsActive ( )
overridevirtual

Returns true if there's any work pending or any worker running.

Implements v8::JobHandle.

Definition at line 244 of file default-job.cc.

◆ IsValid()

bool v8::platform::DefaultJobHandle::IsValid ( )
inlineoverridevirtual

Returns true if associated with a Job and other methods may be called. Returns false after Join() or Cancel() was called. This may return true even if no workers are running and IsCompleted() returns true

Implements v8::JobHandle.

Definition at line 120 of file default-job.h.

◆ Join()

void v8::platform::DefaultJobHandle::Join ( )
overridevirtual

Contributes to the job on this thread. Doesn't return until all tasks have completed and max concurrency becomes 0. When Join() is called and max concurrency reaches 0, it should not increase again. This also promotes this Job's priority to be at least as high as the calling thread's priority.

Implements v8::JobHandle.

Definition at line 230 of file default-job.cc.

◆ NotifyConcurrencyIncrease()

void v8::platform::DefaultJobHandle::NotifyConcurrencyIncrease ( )
inlineoverridevirtual

Notifies the scheduler that max concurrency was increased, and the number of worker should be adjusted accordingly. See Platform::PostJob() for more details.

Implements v8::JobHandle.

Definition at line 112 of file default-job.h.

◆ operator=()

DefaultJobHandle & v8::platform::DefaultJobHandle::operator= ( const DefaultJobHandle & )
delete

◆ UpdatePriority()

void v8::platform::DefaultJobHandle::UpdatePriority ( TaskPriority new_priority)
overridevirtual

Update this Job's priority.

Reimplemented from v8::JobHandle.

Definition at line 246 of file default-job.cc.

◆ UpdatePriorityEnabled()

bool v8::platform::DefaultJobHandle::UpdatePriorityEnabled ( ) const
inlineoverridevirtual

Returns true if job priority can be changed.

Reimplemented from v8::JobHandle.

Definition at line 122 of file default-job.h.

Member Data Documentation

◆ state_

std::shared_ptr<DefaultJobState> v8::platform::DefaultJobHandle::state_
private

Definition at line 127 of file default-job.h.


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