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

#include <v8-platform.h>

Inheritance diagram for v8::JobHandle:
Collaboration diagram for v8::JobHandle:

Public Member Functions

virtual ~JobHandle ()=default
 
virtual void NotifyConcurrencyIncrease ()=0
 
virtual void Join ()=0
 
virtual void Cancel ()=0
 
virtual void CancelAndDetach ()=0
 
virtual bool IsActive ()=0
 
virtual bool IsValid ()=0
 
virtual bool UpdatePriorityEnabled () const
 
virtual void UpdatePriority (TaskPriority new_priority)
 

Detailed Description

Handle returned when posting a Job. Provides methods to control execution of the posted Job.

Definition at line 241 of file v8-platform.h.

Constructor & Destructor Documentation

◆ ~JobHandle()

virtual v8::JobHandle::~JobHandle ( )
virtualdefault

Member Function Documentation

◆ Cancel()

virtual void v8::JobHandle::Cancel ( )
pure virtual

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

Implemented in v8::platform::DefaultJobHandle.

◆ CancelAndDetach()

virtual void v8::JobHandle::CancelAndDetach ( )
pure virtual

◆ IsActive()

virtual bool v8::JobHandle::IsActive ( )
pure virtual

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

Implemented in v8::platform::DefaultJobHandle.

◆ IsValid()

virtual bool v8::JobHandle::IsValid ( )
pure virtual

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

Implemented in v8::platform::DefaultJobHandle.

◆ Join()

virtual void v8::JobHandle::Join ( )
pure virtual

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.

Implemented in v8::platform::DefaultJobHandle.

◆ NotifyConcurrencyIncrease()

virtual void v8::JobHandle::NotifyConcurrencyIncrease ( )
pure virtual

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

Implemented in v8::platform::DefaultJobHandle.

Here is the caller graph for this function:

◆ UpdatePriority()

virtual void v8::JobHandle::UpdatePriority ( TaskPriority new_priority)
inlinevirtual

Update this Job's priority.

Reimplemented in v8::platform::DefaultJobHandle.

Definition at line 294 of file v8-platform.h.

◆ UpdatePriorityEnabled()

virtual bool v8::JobHandle::UpdatePriorityEnabled ( ) const
inlinevirtual

Returns true if job priority can be changed.

Reimplemented in v8::platform::DefaultJobHandle.

Definition at line 289 of file v8-platform.h.


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