v8  9.0.257(node16.0.0)
V8 is Google's open source JavaScript engine
JobTask Class Referenceabstract

#include <v8-platform.h>

Public Member Functions

virtual ~JobTask ()=default
 
virtual void Run (JobDelegate *delegate)=0
 
virtual size_t GetMaxConcurrency (size_t worker_count) const =0
 
virtual size_t GetMaxConcurrency () const
 

Detailed Description

A JobTask represents work to run in parallel from Platform::PostJob().

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

Constructor & Destructor Documentation

◆ ~JobTask()

virtual ~JobTask ( )
virtualdefault

Member Function Documentation

◆ GetMaxConcurrency() [1/2]

virtual size_t GetMaxConcurrency ( ) const
inlinevirtual

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

◆ GetMaxConcurrency() [2/2]

virtual size_t GetMaxConcurrency ( size_t  worker_count) const
pure virtual

Controls the maximum number of threads calling Run() concurrently, given the number of threads currently assigned to this job and executing Run(). Run() is only invoked if the number of threads previously running Run() was less than the value returned. Since GetMaxConcurrency() is a leaf function, it must not call back any JobHandle methods.

◆ Run()

virtual void Run ( JobDelegate delegate)
pure virtual

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