v8  8.6.395 (node 15.0.1)
V8 is Google's open source JavaScript engine
JobHandle Class Referenceabstract

#include <v8-platform.h>

Public Member Functions

virtual ~JobHandle ()=default
 
virtual void NotifyConcurrencyIncrease ()=0
 
virtual void Join ()=0
 
virtual void Cancel ()=0
 
virtual bool IsCompleted ()
 
virtual bool IsRunning ()=0
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ ~JobHandle()

virtual ~JobHandle ( )
virtualdefault

Member Function Documentation

◆ Cancel()

virtual void Cancel ( )
pure virtual

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

◆ IsCompleted()

virtual bool IsCompleted ( )
inlinevirtual

Returns true if there's no work pending and no worker running. TODO(etiennep): Make pure virtual once custom embedders implement it.

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

◆ IsRunning()

virtual bool IsRunning ( )
pure virtual

Returns true if associated with a Job and other methods may be called. Returns false after Join() or Cancel() was called.

◆ Join()

virtual void 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.

◆ NotifyConcurrencyIncrease()

virtual void 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.


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